changeset 2067:2e08496c40c2

Слияние
author Ritor1
date Tue, 03 Dec 2013 09:22:28 +0600
parents f7e5b9f236ae (current diff) 87be06553c76 (diff)
children a290d9fbdc95
files
diffstat 37 files changed, 15748 insertions(+), 1140 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/Actor.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -2203,7 +2203,7 @@
 
   v7->uYawAngle = stru_5C6E00->Atan2(
                     pParty->vPosition.x + (int)fixpoint_mul(stru_5C6E00->Cos(v18 + stru_5C6E00->uIntegerPi + v10->uYawAngle), v10->uDistanceXZ) - v7->vPosition.x,
-                    pParty->vPosition.y + (int)fixpoint_mul(stru_5C6E00->Sin(v18 + stru_5C6E00->uIntegerPi + v10->uYawAngle), v10->uDistanceXZ) - v7->vPosition.y);
+                      pParty->vPosition.y + (int)fixpoint_mul(stru_5C6E00->Sin(v18 + stru_5C6E00->uIntegerPi + v10->uYawAngle), v10->uDistanceXZ) - v7->vPosition.y);
   if ( uActionLength )
     v7->uCurrentActionLength = uActionLength;
   else
@@ -3097,7 +3097,7 @@
 			else if ( pActor->uAIState == AttackingMelee )
 			{
 				v35 = pActor->special_ability_use_check(actor_id);
-				stru_50FE08.Add(
+				AttackerInfo.Add(
 					a1,
 					5120,
 					pActor->vPosition.x,
@@ -4036,8 +4036,8 @@
             flag = true;
           if ( flag == true )
           {
-            if ( !(pPlayers[j + 1]->pConditions[12] | pPlayers[j + 1]->pConditions[13]
-                 | pPlayers[j + 1]->pConditions[14] | pPlayers[j + 1]->pConditions[15] | pPlayers[j + 1]->pConditions[16]) )
+            if ( !(pPlayers[j + 1]->pConditions[Condition_Paralyzed] | pPlayers[j + 1]->pConditions[Condition_Unconcious]
+                 | pPlayers[j + 1]->pConditions[Condition_Dead] | pPlayers[j + 1]->pConditions[Condition_Pertified] | pPlayers[j + 1]->pConditions[Condition_Eradicated]) )
               Victims_list[v2++] = j;
           }
         }
@@ -4048,8 +4048,8 @@
   }
   for ( uint i = 0; i < 4; ++i )
   {
-    if ( !(pPlayers[i + 1]->pConditions[12] | pPlayers[i + 1]->pConditions[13]
-         | pPlayers[i + 1]->pConditions[14] | pPlayers[i + 1]->pConditions[15] | pPlayers[i + 1]->pConditions[16]) )
+    if ( !(pPlayers[i + 1]->pConditions[Condition_Paralyzed] | pPlayers[i + 1]->pConditions[Condition_Unconcious]
+         | pPlayers[i + 1]->pConditions[Condition_Dead] | pPlayers[i + 1]->pConditions[Condition_Pertified] | pPlayers[i + 1]->pConditions[Condition_Eradicated]) )
       Victims_list[v2++] = i;
   }
   if ( v2 )
--- a/Build/Visual Studio 2012/World of Might and Magic.vcxproj	Tue Dec 03 09:22:24 2013 +0600
+++ b/Build/Visual Studio 2012/World of Might and Magic.vcxproj	Tue Dec 03 09:22:28 2013 +0600
@@ -166,6 +166,7 @@
     <ClCompile Include="..\..\LightsStack.cpp" />
     <ClCompile Include="..\..\LOD.cpp" />
     <ClCompile Include="..\..\Log.cpp" />
+    <ClCompile Include="..\..\LuaVM.cpp" />
     <ClCompile Include="..\..\mm7text_ru.cpp" />
     <ClCompile Include="..\..\mm7_2.cpp" />
     <ClCompile Include="..\..\mm7_3.cpp" />
@@ -226,7 +227,6 @@
     <ClCompile Include="..\..\Vis.cpp" />
     <ClCompile Include="..\..\Weather.cpp" />
     <ClCompile Include="..\..\_deleted.cpp" />
-    <ClCompile Include="LuaVM.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\Actor.h" />
@@ -386,8 +386,14 @@
       <FileType>Document</FileType>
       <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">call "../../lib/swig" "%(FileName)" %(RelativeDir) "%(FileName)%(Extension)" "%(FullPath)" "$(SolutionDir)" %(Filename)_wrap.cxx</Command>
       <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename)_wrap.cxx</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).swig</Message>
     </CustomBuild>
     <None Include="..\..\lib\swig.bat" />
+    <None Include="..\..\Player.swig">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">call "../../lib/swig" "%(FileName)" %(RelativeDir) "%(FileName)%(Extension)" "%(FullPath)" "$(SolutionDir)" %(Filename)_wrap.cxx</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename)_wrap.cxx</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).swig</Message>
+    </None>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
--- a/Build/Visual Studio 2012/World of Might and Magic.vcxproj.filters	Tue Dec 03 09:22:24 2013 +0600
+++ b/Build/Visual Studio 2012/World of Might and Magic.vcxproj.filters	Tue Dec 03 09:22:28 2013 +0600
@@ -308,7 +308,7 @@
       <Filter>NewUI\Core</Filter>
     </ClCompile>
     <ClCompile Include="..\..\Timer.cpp" />
-    <ClCompile Include="LuaVM.cpp" />
+    <ClCompile Include="..\..\LuaVM.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\Level\Decoration.h">
@@ -603,10 +603,12 @@
     <None Include="..\..\lib\swig.bat">
       <Filter>lib</Filter>
     </None>
+    <None Include="..\..\Player.swig" />
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\NewUI\Core\UIControlModule.swig">
       <Filter>NewUI\Core</Filter>
     </CustomBuild>
+    <CustomBuild Include="..\..\PlayerModule.swig" />
   </ItemGroup>
 </Project>
\ No newline at end of file
--- a/CastSpellInfo.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/CastSpellInfo.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -1119,7 +1119,7 @@
 				LODWORD(v727) = 1;
 				do
 				{
-					if ( v92->pConditions[1] )
+					if ( v92->pConditions[Condition_Weak] )
 						LODWORD(v727) = 0;
 					++v92;
 				}
@@ -1742,11 +1742,11 @@
 				pPlayer = &pParty->pPlayers[i];
 				if ( v731 == 4 )
 				{
-					if ( pPlayer->pConditions[2] )
+					if ( pPlayer->pConditions[Condition_Sleep] )
 					{
 						//*((int *)v222 + 4) = 0;
 						//*((int *)v222 + 5) = 0;
-						pPlayer->pConditions[2] = 0;
+						pPlayer->pConditions[Condition_Sleep] = 0;
 						pPlayer->PlaySound(SPEECH_103, 0);
 					}
 				}
@@ -2164,8 +2164,8 @@
 			if ( !pPlayer->CanCastSpell(uRequiredMana) )
 				break;
 			v323 = pCastSpell->uPlayerID_2;
-			v324 = (char *)&pParty->pPlayers[v323].pConditions[15];
-			if ( !pParty->pPlayers[v323].pConditions[15] )
+			v324 = (char *)&pParty->pPlayers[v323].pConditions[Condition_Pertified];
+			if ( !pParty->pPlayers[v323].pConditions[Condition_Pertified] )
 			{
 				LODWORD(v727) = 1;
 				break;
@@ -2332,15 +2332,15 @@
 			if ( !pPlayer->CanCastSpell(uRequiredMana) )
 				break;
 			v351 = &pParty->pPlayers[pCastSpell->uPlayerID_2];
-			if ( !v351->pConditions[0] )
+			if ( !v351->pConditions[Condition_Cursed] )
 			{
 				LODWORD(v727) = 1;
 				break;
 			}
 			if ( v731 == 4 )
 			{
-				LODWORD(v351->pConditions[0]) = 0;
-				HIDWORD(v351->pConditions[0]) = 0;
+				LODWORD(v351->pConditions[Condition_Cursed]) = 0;
+				HIDWORD(v351->pConditions[Condition_Cursed]) = 0;
 			}
 			else
 			{
--- a/Chest.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/Chest.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -417,7 +417,7 @@
         v21 = _i;
       }
     }
-    if ( v22 == v5 )
+    if ( v21 == v5 )
     {
       if ( uActiveCharacter )
         pPlayers[uActiveCharacter]->PlaySound(SPEECH_NoRoom, 0);
--- a/Game.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/Game.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -304,7 +304,6 @@
   if (bLoading)
   {
     pParty->Reset();
-    dword_6BE340 = 0;
     uGameState = GAME_STATE_PLAYING;
     LoadGame(uLoadGameUI_SelectedSlot);
   }
@@ -333,8 +332,7 @@
     }
     DoPrepareWorld(bLoading, 1);
     pEventTimer->Resume();
-    dword_6BE364_game_settings_1 |= 0x80;
-    dword_6BE340 = 2;
+    dword_6BE364_game_settings_1 |= GAME_SETTINGS_0080_SKIP_USER_INPUT_THIS_FRAME;
     // uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0;
     pCurrentScreen = SCREEN_GAME;
 
@@ -351,7 +349,7 @@
         TranslateMessage(&Msg);
         DispatchMessageA(&Msg);
       }
-      if (dword_6BE364_game_settings_1 & 0x0100 )
+      if (dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE)
       {
         WaitMessage();
         continue;
@@ -382,10 +380,9 @@
       {
         if ( !pEventTimer->bTackGameTime )
           _494035_timed_effects__water_walking_damage__etc();
-        if ( dword_6BE364_game_settings_1 & 1 )
-        {
-          dword_6BE364_game_settings_1 &= 0xFFFFFFFEu;
-        }
+
+        if (dword_6BE364_game_settings_1 & GAME_SETTINGS_0001)
+          dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_0001;
         else
         {
           UpdateActorAI();
@@ -547,7 +544,6 @@
     }
     while (!game_finished);
 
-    dword_6BE340 = 0;
     pEventTimer->Pause();
     ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows();
     if ( uGameState == GAME_STATE_LOADING_GAME )
@@ -754,7 +750,6 @@
     WriteWindowsRegistryInt("window X", window->GetX());
     WriteWindowsRegistryInt("window Y", window->GetY());
   }
-  window->Delete();
   WriteWindowsRegistryInt("valAlwaysRun", bAlwaysRun);
   pItemsTable->Release();
   pNPCStats->Release();
@@ -3049,7 +3044,7 @@
           sub_42FBDD();
           SaveGame(1, 0);
           strcpy(pCurrentMapName, pMapStats->pInfos[uHouse_ExitPic].pFilename);
-          dword_6BE364_game_settings_1 |= 1;
+          dword_6BE364_game_settings_1 |= GAME_SETTINGS_0001;
           uGameState = GAME_STATE_2;
           //v53 = p2DEvents_minus1_::30[26 * (unsigned int)ptr_507BC0->ptr_1C];
           v53 = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1]._quest_related;
@@ -3157,7 +3152,7 @@
               SaveGame(1, 0);
               OnMapLeave();
               strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[pPlayer9->pInstalledBeacons[uMessageParam].SaveFileID]);
-              dword_6BE364_game_settings_1 |= 1;
+              dword_6BE364_game_settings_1 |= GAME_SETTINGS_0001;
               uGameState = GAME_STATE_2;
               _5B65A8_npcdata_uflags_or_other = pPlayer9->pInstalledBeacons[uMessageParam].PartyPos_X;
               _5B65AC_npcdata_fame_or_other = pPlayer9->pInstalledBeacons[uMessageParam].PartyPos_Y;
@@ -3238,7 +3233,7 @@
                   {
                     SaveGame(1, 0);
                     OnMapLeave();
-                    dword_6BE364_game_settings_1 |= 1;
+                    dword_6BE364_game_settings_1 |= GAME_SETTINGS_0001;
                     uGameState = GAME_STATE_2;
                     strcpy(pCurrentMapName, pMapStats->pInfos[TownPortalList[uMessageParam].uMapInfoID].pFilename);
                     dword_5B65C0 = 1;
@@ -3421,7 +3416,7 @@
               if ( (signed int)pNPCData3 < (signed int)pNPCData4 )
               {
                 strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[(int)pNPCData3]);
-                dword_6BE364_game_settings_1 |= 1u;
+                dword_6BE364_game_settings_1 |= GAME_SETTINGS_0001;
                 uGameState = GAME_STATE_2;
                 OnMapLeave();
                 continue;
@@ -4608,7 +4603,7 @@
             ModalWindow_Release();
             break;
           }
-          if ( !(BYTE1(dword_6BE364_game_settings_1) & 0x40) )
+          if ( !(dword_6BE364_game_settings_1 & GAME_SETTINGS_4000))
             break;
           v15 = 1;
           pVideoPlayer->bStopBeforeSchedule = 1;
--- a/Indoor.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/Indoor.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -2138,8 +2138,8 @@
     }
   }
 
-  if (dword_6BE364_game_settings_1 & 0x2000 )
-    _i = 29030400;
+  if (dword_6BE364_game_settings_1 & GAME_SETTINGS_2000 )
+    _i = 0x1BAF800;
   bool _a = false;
   if ( a3 - dlv.uLastRepawnDay >= _i && _stricmp(pCurrentMapName, "d29.dlv") )
     _a = true;
@@ -3697,12 +3697,12 @@
     Error("Attempt to open new level before clearing old");
   if ( v6 == 1 )
     Error("Out of memory loading indoor level");
-  if ( !(dword_6BE364_game_settings_1 & 0x2000) )
+  if ( !(dword_6BE364_game_settings_1 & GAME_SETTINGS_2000) )
   {
     InitializeActors();
     InitializeSpriteObjects();
   }
-  BYTE1(dword_6BE364_game_settings_1) &= 0xDFu;
+  dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_2000;
   if ( !v39 )
     pDest = 0;
   if ( pDest == 1 )
--- a/LuaVM.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/LuaVM.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -4,6 +4,7 @@
 #include "OSAPI.h"
 
 extern "C" int luaopen_UIControl(lua_State *L); // declare the wrapped module
+extern "C" int luaopen_Player(lua_State *L); // declare the wrapped module
 
 LuaVM *lua = nullptr;
 
--- a/NewUI/Core/UIControl.h	Tue Dec 03 09:22:24 2013 +0600
+++ b/NewUI/Core/UIControl.h	Tue Dec 03 09:22:28 2013 +0600
@@ -10,45 +10,11 @@
     virtual bool Focused() = 0;
 
     // Events
-    virtual bool OnKey(int key)
-    {
-      for (auto i = children.begin(); i != children.end(); ++i)
-        if ((*i)->OnKey(key))
-          return true;
-      return false;
-    }
-
-    virtual bool OnMouseLeftClick(int x, int y)
-    {
-      for (auto i = children.begin(); i != children.end(); ++i)
-        if ((*i)->OnMouseLeftClick(x, y))
-          return true;
-      return false;
-    }
-
-    virtual bool OnMouseRightClick(int x, int y)
-    {
-      for (auto i = children.begin(); i != children.end(); ++i)
-        if ((*i)->OnMouseRightClick(x, y))
-          return true;
-      return false;
-    }
-
-    virtual bool OnMouseEnter()
-    {
-      for (auto i = children.begin(); i != children.end(); ++i)
-        if ((*i)->OnMouseEnter())
-          return true;
-      return false;
-    }
-
-    virtual bool OnMouseLeave()
-    {
-      for (auto i = children.begin(); i != children.end(); ++i)
-        if ((*i)->OnMouseLeave())
-          return true;
-      return false;
-    }
+    virtual bool OnKey(int key)                  {return DefaultOnKey(key);}
+    virtual bool OnMouseLeftClick(int x, int y)  {return DefaultOnMouseLeftClick(x, y);}
+    virtual bool OnMouseRightClick(int x, int y) {return DefaultOnMouseRightClick(x, y);}
+    virtual bool OnMouseEnter()                  {return DefaultOnMouseEnter();}
+    virtual bool OnMouseLeave()                  {return DefaultOnMouseLeave();}
 
     // Container
     virtual bool AddControl(UIControl *ctrl)
@@ -56,6 +22,7 @@
       if (std::find(children.begin(), children.end(), ctrl) == children.end())
       {
         children.push_back(ctrl);
+        ctrl->parent = this;
         return true;
       }
       return false;
@@ -67,10 +34,55 @@
 
       children.remove(ctrl);
       if (i != children.end())
+      {
+        ctrl->parent = nullptr;
         return true;
+      }
       return false;
     }
 
   protected:
-    std::list<UIControl *> children;
+    UIControl              *parent;
+    std::list<UIControl *>  children;
+
+
+    bool DefaultOnKey(int key)
+    {
+      for (auto i = children.begin(); i != children.end(); ++i)
+        if ((*i)->OnKey(key))
+          return true;
+      return false;
+    }
+
+    bool DefaultOnMouseLeftClick(int x, int y)
+    {
+      for (auto i = children.begin(); i != children.end(); ++i)
+        if ((*i)->OnMouseLeftClick(x, y))
+          return true;
+      return false;
+    }
+
+    bool DefaultOnMouseRightClick(int x, int y)
+    {
+      for (auto i = children.begin(); i != children.end(); ++i)
+        if ((*i)->OnMouseRightClick(x, y))
+          return true;
+      return false;
+    }
+
+    bool DefaultOnMouseEnter()
+    {
+      for (auto i = children.begin(); i != children.end(); ++i)
+        if ((*i)->OnMouseEnter())
+          return true;
+      return false;
+    }
+
+    bool DefaultOnMouseLeave()
+    {
+      for (auto i = children.begin(); i != children.end(); ++i)
+        if ((*i)->OnMouseLeave())
+          return true;
+      return false;
+    }
 };
\ No newline at end of file
--- a/OSAPI.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/OSAPI.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -25,6 +25,7 @@
 
   pVersion = new OSVersion;
   {
+
     Log::Warning(L"OS init: ok");
 
     extern bool MM_Main(const wchar_t *pCmdLine);
--- a/OSWindow.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/OSWindow.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -269,7 +269,7 @@
     case WM_ACTIVATEAPP:
       if ( wparam && (GetForegroundWindow() == api_handle || GetForegroundWindow() == hInsertCDWindow) )
       {
-        if ( BYTE1(dword_6BE364_game_settings_1) & 1 )
+        if (dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE)
         {
           dword_4E98BC_bApplicationActive = 1;
           if ( pRenderer->bWindowMode )
@@ -281,7 +281,7 @@
             if (bitsPerPixel != 16 || planes != 1)
               Error(pGlobalTXT_LocalizationStrings[62]);
           }
-          BYTE1(dword_6BE364_game_settings_1) &= 0xFEu;
+          dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_APP_INACTIVE;
 
           if ( pArcomageGame->bGameInProgress )
           {
@@ -289,12 +289,12 @@
           }
           else
           {
-            if ( BYTE1(dword_6BE364_game_settings_1) & 2 )
-              BYTE1(dword_6BE364_game_settings_1) &= 0xFDu;
+            if (dword_6BE364_game_settings_1 & GAME_SETTINGS_0200_EVENT_TIMER)
+              dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_0200_EVENT_TIMER;
             else
               pEventTimer->Resume();
-            if ( BYTE1(dword_6BE364_game_settings_1) & 4 )
-              BYTE1(dword_6BE364_game_settings_1) &= 0xFBu;
+            if (dword_6BE364_game_settings_1 & GAME_SETTINGS_0400_MISC_TIMER)
+              dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_0400_MISC_TIMER;
             else
               pMiscTimer->Resume();
 
@@ -312,7 +312,7 @@
       }
       else
       {
-        if (!(dword_6BE364_game_settings_1 & 0x100))
+        if (!(dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE))
         {
           dword_4E98BC_bApplicationActive = 0;
           if ( (pVideoPlayer->pSmackerMovie || pVideoPlayer->pBinkMovie) && pVideoPlayer->bPlayingMovie )
@@ -321,13 +321,13 @@
           if (/*pRenderer->bUserDirect3D && */pRenderer->uAcquiredDirect3DDevice == 1)
             SetWindowPos(api_handle, (HWND)0xFFFFFFFE, 0, 0, 0, 0, 0x18u);
           ClipCursor(0);
-          dword_6BE364_game_settings_1 |= 0x100u;
+          dword_6BE364_game_settings_1 |= GAME_SETTINGS_APP_INACTIVE;
           if ( pEventTimer->bPaused )
-            BYTE1(dword_6BE364_game_settings_1) |= 2u;
+            dword_6BE364_game_settings_1 |= GAME_SETTINGS_0200_EVENT_TIMER;
           else
             pEventTimer->Pause();
           if ( pMiscTimer->bPaused )
-            BYTE1(dword_6BE364_game_settings_1) |= 4u;
+            dword_6BE364_game_settings_1 |= GAME_SETTINGS_0400_MISC_TIMER;
           else
             pMiscTimer->Pause();
 
@@ -401,8 +401,7 @@
   if (!RegisterClassExW(&wcxw))
     return false;
 
-  api_handle = CreateWindowExW(0, wcxw.lpszClassName, title,
-                               0,
+  api_handle = CreateWindowExW(0, wcxw.lpszClassName, title, 0,
                                0, 0, window_width, window_height, nullptr,
                                nullptr, wcxw.hInstance, this);
   if (!api_handle)
@@ -411,15 +410,6 @@
     return false;
   }
 
-  HDC hDC = GetDC(NULL);
-  int bitsPerPixel = GetDeviceCaps(hDC, BITSPIXEL);
-  int planes = GetDeviceCaps(hDC, PLANES);
-  ReleaseDC(NULL, hDC);
-  if (bitsPerPixel != 16 || planes != 1)
-  {
-	SetColorDepth(16);
-  }
-
   SetWindowedMode(window_width, window_height);
   Show();
 
@@ -440,7 +430,7 @@
 
 OSWindow *OSWindow::Create(const wchar_t *title, int window_width, int window_height)
 {
-  OSWindow* window = new OSWindow;
+  auto window = new OSWindow;
   if (window)
     if (!window->Initialize(title, window_width, window_height))
     {
@@ -800,39 +790,3 @@
 
   return true;
 }
-
-bool OSWindow::SetColorDepth(int bit)
-{
-  DEVMODE dm;
-  if (!EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm))
-  {
-    Log::Warning(L"EnumDisplaySettings failed: %d\n", GetLastError());
-    return false;
-  }
-  
-  dm.dmSize = sizeof(DEVMODE);
-  dm.dmBitsPerPel = bit;
-  dm.dmFields = DM_BITSPERPEL;
-  if (ChangeDisplaySettings(&dm, CDS_TEST) != DISP_CHANGE_SUCCESSFUL)
-  {
-    Log::Warning(L"Illegal graphics mode: %d\n", GetLastError());
-    return false;
-  }
-  if (ChangeDisplaySettings(&dm, 0) == DISP_CHANGE_SUCCESSFUL)
-  {
-    ChangedColorDepth = true;
-  }
-}
-
-void OSWindow::Delete()
-{
-	Deinitialize();
-}
-
-void OSWindow::Deinitialize()
-{
-	if( ChangedColorDepth )
-	{
-		SetColorDepth(32);
-	}
-}
\ No newline at end of file
--- a/OSWindow.h	Tue Dec 03 09:22:24 2013 +0600
+++ b/OSWindow.h	Tue Dec 03 09:22:28 2013 +0600
@@ -6,7 +6,6 @@
 {
   public:
     static OSWindow *Create(const wchar_t *title, int window_width, int window_height);
-    void Delete();
 
     void SetFullscreenMode();
     void SetWindowedMode(int new_window_width, int new_window_height);
@@ -40,14 +39,11 @@
 
   protected:
     bool Initialize(const wchar_t *title, int window_width, int window_height);
-	void Deinitialize();
-	bool SetColorDepth(int bit);
     bool WinApiMessageProc(UINT msg, WPARAM wparam, LPARAM lparam, LRESULT *result);
 
     HWND    api_handle;
 
   private:
-    bool ChangedColorDepth;
     static LPARAM __stdcall WinApiMsgRouter(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
 
     HMENU CreateDebugMenuPanel();
--- a/Outdoor.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/Outdoor.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -2112,8 +2112,8 @@
     }
   }
 
-  if ( BYTE1(dword_6BE364_game_settings_1) & 0x20 )
-    pNumItems = 29030400;
+  if (dword_6BE364_game_settings_1 & GAME_SETTINGS_2000)
+    pNumItems = 0x1BAF800;
   if ( Str2 )
   {
     memset(Dst, 0, 0x3C8u);
@@ -2715,39 +2715,36 @@
 // 6807E0: using guessed type int _6807E0_num_decorations_6807B8;
 
 //----- (0047F223) --------------------------------------------------------
-int OutdoorLocation::_47F223_LooksLikeGenerateMonsterLoot()
+void OutdoorLocation::ArrangeSpriteObjects()
 {
-  signed int v1; // ebx@1
   char *v2; // esi@2
-  int v3; // eax@7
   OutdoorLocation *v5; // [sp+0h] [bp-4h]@1
 
   v5 = this;
-  v1 = 0;
+  
   if ( (signed int)uNumSpriteObjects > 0 )
   {
     v2 = (char *)&pSpriteObjects[0].uObjectDescID;
-    do
+    for ( int i = 0; i < (signed int)uNumSpriteObjects; ++i )
     {
-      if ( *(short *)v2 )
+      if ( pSpriteObjects[i].uObjectDescID )
       {
-        if ( !(v2[24] & 8) && !(pObjectList->pObjects[*(short *)v2].uFlags & 0x10) )
-          *(int *)(v2 + 10) = GetTerrainHeightsAroundParty2(*(int *)(v2 + 2), *(int *)(v2 + 6), (int *)&v5, 0);
-        v3 = *(int *)(v2 + 34);
-        if ( v3 )
+        if ( !(v2[24] & 8) && !(pObjectList->pObjects[pSpriteObjects[i].uObjectDescID].uFlags & 0x10) )
+          pSpriteObjects[i].vPosition.z = GetTerrainHeightsAroundParty2(pSpriteObjects[i].vPosition.x,
+                              pSpriteObjects[i].vPosition.y, (int *)&v5, 0);
+        if ( pSpriteObjects[i].stru_24.uItemID )
         {
-          if ( v3 != 220 && pItemsTable->pItems[v3].uEquipType == 14 && !*(int *)(v2 + 38) )
-            *(int *)(v2 + 38) = rand() % 15 + 5;
-          pItemsTable->SetSpecialBonus((ItemGen *)(v2 + 34));
+          if ( pSpriteObjects[i].stru_24.uItemID != 220
+            && pItemsTable->pItems[pSpriteObjects[i].stru_24.uItemID].uEquipType == EQUIP_POTION
+            && !pSpriteObjects[i].stru_24.uEnchantmentType )
+             pSpriteObjects[i].stru_24.uEnchantmentType = rand() % 15 + 5;
+          pItemsTable->SetSpecialBonus(&pSpriteObjects[i].stru_24);
         }
       }
-      ++v1;
       v2 += 112;
     }
-    while ( v1 < (signed int)uNumSpriteObjects );
   }
   pGameLoadingUI_ProgressBar->Progress();
-  return 1;
 }
 
 //----- (0047F2D3) --------------------------------------------------------
--- a/Outdoor.h	Tue Dec 03 09:22:24 2013 +0600
+++ b/Outdoor.h	Tue Dec 03 09:22:28 2013 +0600
@@ -147,7 +147,7 @@
   bool _47F097(signed int a2, signed int a3);
   bool _47F0E2();
   bool PrepareDecorations();
-  int _47F223_LooksLikeGenerateMonsterLoot();
+  void ArrangeSpriteObjects();
   bool InitalizeActors(int a1);
   bool LoadRoadTileset();
   bool LoadTileGroupIds();
--- a/Party.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/Party.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -160,7 +160,6 @@
 int Party::GetNextActiveCharacter()
 {
   int v2; // eax@4
-  Player *v6; // eax@7
   signed int v8; // esi@23
   int v12; // [sp+Ch] [bp-4h]@1
 
@@ -177,12 +176,8 @@
     playerAlreadyPicked.fill(false);
   for (int i = 0; i < 4; i++)
   {
-    v6 = &this->pPlayers[i];
-    if ( !v6->CanAct()
-      || v6->uTimeToRecovery > 0)
-    {
+    if ( !this->pPlayers[i].CanAct() || this->pPlayers[i].uTimeToRecovery > 0)
       playerAlreadyPicked[i] = true;
-    }
     else if ( !playerAlreadyPicked[i] )
     {
       playerAlreadyPicked[i] = true;
@@ -194,8 +189,7 @@
 
   for (int i = 0; i < 4; i++)
   {
-    if ( this->pPlayers[i].CanAct()
-      && this->pPlayers[i].uTimeToRecovery == 0 )
+    if ( this->pPlayers[i].CanAct() && this->pPlayers[i].uTimeToRecovery == 0 )
     {
       if ( v12 == 0 || this->pPlayers[i].uSpeedBonus > v8 )
       {
@@ -818,9 +812,9 @@
     InitializeActors();
   v2 = (signed __int64)((7680 * uHoursToSleep) * 0.033333335);
   pParty->uTimePlayed += v2;
-  for (int i = 0; i < 4; i++)
+  for (int i = 1; i <= 4; i++)
   {
-    pPlayers[i + 1]->Recover((int)v2);
+    pPlayers[i]->Recover((int)v2);
   }
   _494035_timed_effects__water_walking_damage__etc();
 }
--- a/Player.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/Player.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -34,6 +34,9 @@
 
 
 
+NZIArray<struct Player *, 5> pPlayers;
+
+
 /*  381 */
 #pragma pack(push, 1)
 struct PlayerCreation_AttributeProps
@@ -4381,6 +4384,7 @@
               if ( new_mana_val > playerAffected->GetMaxMana() )
                   new_mana_val = playerAffected->GetMaxMana();
               playerAffected->PlaySound(SPEECH_36, 0);
+              playerAffected->sMana = new_mana_val;
               break;
           case 224: //Cure Weakness
               playerAffected->pConditions[Condition_Weak] = 0i64;
@@ -7345,7 +7349,7 @@
       case 5: damageType = 4; //yes, the original just assigned the value 4
         break;   
     }
-    if ( !(dword_6BE368_debug_settings_2 & 0x10) )
+    if ( !(dword_6BE368_debug_settings_2 & DEBUG_SETTINGS_NO_DAMAGE) )
     {
       dmgToReceive = playerPtr->ReceiveDamage(dmgToReceive, (DAMAGE_TYPE)damageType);
       if ( playerPtr->pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].uExpireTime > 0 )
@@ -7382,7 +7386,7 @@
           }
         }
       }
-      if ( !(dword_6BE368_debug_settings_2 & 0x10)
+      if ( !(dword_6BE368_debug_settings_2 & DEBUG_SETTINGS_NO_DAMAGE)
         && actorPtr->pMonsterInfo.uSpecialAttackType
         && rand() % 100 < actorPtr->pMonsterInfo.uLevel * actorPtr->pMonsterInfo.uSpecialAttackLevel )
       {
@@ -7537,7 +7541,7 @@
           damageType = 4;
           break;
       }
-      if ( !(dword_6BE368_debug_settings_2 & 0x10) )
+      if ( !(dword_6BE368_debug_settings_2 & DEBUG_SETTINGS_NO_DAMAGE) )
       {
         int reflectedDmg = playerPtr->ReceiveDamage(dmgToReceive, (DAMAGE_TYPE)damageType);
         if ( playerPtr->pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].uExpireTime > 0 )
@@ -7576,7 +7580,7 @@
         }
       }
       if ( !dmgSource
-        && !(dword_6BE368_debug_settings_2 & 0x10)
+        && !(dword_6BE368_debug_settings_2 & DEBUG_SETTINGS_NO_DAMAGE)
         && actorPtr->pMonsterInfo.uSpecialAttackType
         && rand() % 100 < actorPtr->pMonsterInfo.uLevel * actorPtr->pMonsterInfo.uSpecialAttackLevel )
       {
--- a/Player.h	Tue Dec 03 09:22:24 2013 +0600
+++ b/Player.h	Tue Dec 03 09:22:28 2013 +0600
@@ -840,3 +840,5 @@
   char field_1B3B;
 };
 #pragma pack(pop)
+
+extern NZIArray<struct Player *, 5> pPlayers;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Player.swig	Tue Dec 03 09:22:28 2013 +0600
@@ -0,0 +1,6 @@
+%module Player
+%{
+   #include "Player.h"
+%}
+
+%include "../../../Player.h"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Player_wrap.cxx	Tue Dec 03 09:22:28 2013 +0600
@@ -0,0 +1,15002 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.11
+ *
+ * This file is not intended to be easily readable and contains a number of
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG
+ * interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGLUA
+#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
+#define SWIG_LUA_MODULE_GLOBAL
+
+
+#ifdef __cplusplus
+/* SwigValueWrapper is described in swig.swg */
+template<typename T> class SwigValueWrapper {
+  struct SwigMovePointer {
+    T *ptr;
+    SwigMovePointer(T *p) : ptr(p) { }
+    ~SwigMovePointer() { delete ptr; }
+    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
+  } pointer;
+  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
+  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
+public:
+  SwigValueWrapper() : pointer(0) { }
+  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
+  operator T&() const { return *pointer.ptr; }
+  T *operator&() { return pointer.ptr; }
+};
+
+template <typename T> T SwigValueInit() {
+  return T();
+}
+#endif
+
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+#  define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__))
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__))
+# else
+#   define SWIGUNUSED
+# endif
+#endif
+
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility("default")))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic C API SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "4"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the SWIG runtime code.
+  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
+
+  But only do this if strictly necessary, ie, if you have problems
+  with your compiler or suchlike.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/*  Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN        0x1
+#define SWIG_CAST_NEW_MEMORY       0x2
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN           0x1
+
+
+/*
+   Flags/methods for returning states.
+
+   The SWIG conversion methods, as ConvertPtr, return an integer
+   that tells if the conversion was successful or not. And if not,
+   an error code can be returned (see swigerrors.swg for the codes).
+
+   Use the following macros/flags to set or process the returning
+   states.
+
+   In old versions of SWIG, code such as the following was usually written:
+
+     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+       // success code
+     } else {
+       //fail code
+     }
+
+   Now you can be more explicit:
+
+    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+    } else {
+      // fail code
+    }
+
+   which is the same really, but now you can also do
+
+    Type *ptr;
+    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+      if (SWIG_IsNewObj(res) {
+        ...
+	delete *ptr;
+      } else {
+        ...
+      }
+    } else {
+      // fail code
+    }
+
+   I.e., now SWIG_ConvertPtr can return new objects and you can
+   identify the case and take care of the deallocation. Of course that
+   also requires SWIG_ConvertPtr to return new result values, such as
+
+      int SWIG_ConvertPtr(obj, ptr,...) {
+        if (<obj is ok>) {
+          if (<need new object>) {
+            *ptr = <ptr to new allocated object>;
+            return SWIG_NEWOBJ;
+          } else {
+            *ptr = <ptr to old object>;
+            return SWIG_OLDOBJ;
+          }
+        } else {
+          return SWIG_BADOBJ;
+        }
+      }
+
+   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+   SWIG errors code.
+
+   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+   allows to return the 'cast rank', for example, if you have this
+
+       int food(double)
+       int fooi(int);
+
+   and you call
+
+      food(1)   // cast rank '1'  (1 -> 1.0)
+      fooi(1)   // cast rank '0'
+
+   just use the SWIG_AddCast()/SWIG_CheckState()
+*/
+
+#define SWIG_OK                    (0)
+#define SWIG_ERROR                 (-1)
+#define SWIG_IsOK(r)               (r >= 0)
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT         (1 << 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
+/* Simple returning values */
+#define SWIG_BADOBJ                (SWIG_ERROR)
+#define SWIG_OLDOBJ                (SWIG_OK)
+#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+#  ifndef SWIG_TypeRank
+#    define SWIG_TypeRank             unsigned long
+#  endif
+#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
+#    define SWIG_MAXCASTRANK          (2)
+#  endif
+#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
+#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) {
+  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) {
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
+}
+#else /* no cast-rank mode */
+#  define SWIG_AddCast(r) (r)
+#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(*swig_converter_func)(void *, int *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store information on one type */
+typedef struct swig_type_info {
+  const char             *name;			/* mangled name of this type */
+  const char             *str;			/* human readable name of this type */
+  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
+  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
+  void                   *clientdata;		/* language specific type data */
+  int                    owndata;		/* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
+  swig_converter_func     converter;		/* function to cast the void pointers */
+  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
+  struct swig_cast_info  *prev;			/* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
+  size_t                 size;		        /* Number of types in this module */
+  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
+  swig_type_info         **type_initial;	/* Array of initially generated type structures */
+  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
+  void                    *clientdata;		/* Language specific module data */
+} swig_module_info;
+
+/*
+  Compare two type names skipping the space characters, therefore
+  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') && (f1 != l1)) ++f1;
+    while ((*f2 == ' ') && (f2 != l2)) ++f2;
+    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
+  }
+  return (int)((l1 - f1) - (l2 - f2));
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCmp(const char *nb, const char *tb) {
+  int equiv = 1;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (equiv != 0 && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
+}
+
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+  if (ty) {
+    swig_cast_info *iter = ty->cast;
+    while (iter) {
+      if (strcmp(iter->type->name, c) == 0) {
+        if (iter == ty->cast)
+          return iter;
+        /* Move iter to the top of the linked list */
+        iter->prev->next = iter->next;
+        if (iter->next)
+          iter->next->prev = iter->prev;
+        iter->next = ty->cast;
+        iter->prev = 0;
+        if (ty->cast) ty->cast->prev = iter;
+        ty->cast = iter;
+        return iter;
+      }
+      iter = iter->next;
+    }
+  }
+  return 0;
+}
+
+/*
+  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
+  if (ty) {
+    swig_cast_info *iter = ty->cast;
+    while (iter) {
+      if (iter->type == from) {
+        if (iter == ty->cast)
+          return iter;
+        /* Move iter to the top of the linked list */
+        iter->prev->next = iter->next;
+        if (iter->next)
+          iter->next->prev = iter->prev;
+        iter->next = ty->cast;
+        iter->prev = 0;
+        if (ty->cast) ty->cast->prev = iter;
+        ty->cast = iter;
+        return iter;
+      }
+      iter = iter->next;
+    }
+  }
+  return 0;
+}
+
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
+}
+
+/*
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+  swig_type_info *lastty = ty;
+  if (!ty || !ty->dcast) return ty;
+  while (ty && (ty->dcast)) {
+    ty = (*ty->dcast)(ptr);
+    if (ty) lastty = ty;
+  }
+  return lastty;
+}
+
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+  return ty->name;
+}
+
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+  /* The "str" field contains the equivalent pretty names of the
+     type, separated by vertical-bar characters.  We choose
+     to print the last name, as it is often (?) the most
+     specific. */
+  if (!type) return NULL;
+  if (type->str != NULL) {
+    const char *last_name = type->str;
+    const char *s;
+    for (s = type->str; *s; s++)
+      if (*s == '|') last_name = s+1;
+    return last_name;
+  }
+  else
+    return type->name;
+}
+
+/*
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  swig_cast_info *cast = ti->cast;
+  /* if (ti->clientdata == clientdata) return; */
+  ti->clientdata = clientdata;
+
+  while (cast) {
+    if (!cast->converter) {
+      swig_type_info *tc = cast->type;
+      if (!tc->clientdata) {
+	SWIG_TypeClientData(tc, clientdata);
+      }
+    }
+    cast = cast->next;
+  }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientData(ti, clientdata);
+  ti->owndata = 1;
+}
+
+/*
+  Search for a swig_type_info structure only by mangled name
+  Search is a O(log #types)
+
+  We start searching at module start, and finish searching when start == end.
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start,
+                            swig_module_info *end,
+		            const char *name) {
+  swig_module_info *iter = start;
+  do {
+    if (iter->size) {
+      register size_t l = 0;
+      register size_t r = iter->size - 1;
+      do {
+	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
+	register size_t i = (l + r) >> 1;
+	const char *iname = iter->types[i]->name;
+	if (iname) {
+	  register int compare = strcmp(name, iname);
+	  if (compare == 0) {
+	    return iter->types[i];
+	  } else if (compare < 0) {
+	    if (i) {
+	      r = i - 1;
+	    } else {
+	      break;
+	    }
+	  } else if (compare > 0) {
+	    l = i + 1;
+	  }
+	} else {
+	  break; /* should never happen */
+	}
+      } while (l <= r);
+    }
+    iter = iter->next;
+  } while (iter != end);
+  return 0;
+}
+
+/*
+  Search for a swig_type_info structure for either a mangled name or a human readable name.
+  It first searches the mangled names of the types, which is a O(log #types)
+  If a type is not found it then searches the human readable names, which is O(#types).
+
+  We start searching at module start, and finish searching when start == end.
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start,
+                     swig_module_info *end,
+		     const char *name) {
+  /* STEP 1: Search the name field using binary search */
+  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+  if (ret) {
+    return ret;
+  } else {
+    /* STEP 2: If the type hasn't been found, do a complete search
+       of the str field (the human readable name) */
+    swig_module_info *iter = start;
+    do {
+      register size_t i = 0;
+      for (; i < iter->size; ++i) {
+	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
+	  return iter->types[i];
+      }
+      iter = iter->next;
+    } while (iter != end);
+  }
+
+  /* neither found a match */
+  return 0;
+}
+
+/*
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+  static const char hex[17] = "0123456789abcdef";
+  register const unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu =  u + sz;
+  for (; u != eu; ++u) {
+    register unsigned char uu = *u;
+    *(c++) = hex[(uu & 0xf0) >> 4];
+    *(c++) = hex[uu & 0xf];
+  }
+  return c;
+}
+
+/*
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  register unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu = u + sz;
+  for (; u != eu; ++u) {
+    register char d = *(c++);
+    register unsigned char uu;
+    if ((d >= '0') && (d <= '9'))
+      uu = ((d - '0') << 4);
+    else if ((d >= 'a') && (d <= 'f'))
+      uu = ((d - ('a'-10)) << 4);
+    else
+      return (char *) 0;
+    d = *(c++);
+    if ((d >= '0') && (d <= '9'))
+      uu |= (d - '0');
+    else if ((d >= 'a') && (d <= 'f'))
+      uu |= (d - ('a'-10));
+    else
+      return (char *) 0;
+    *u = uu;
+  }
+  return c;
+}
+
+/*
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&ptr,sizeof(void *));
+  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------
+ * luarun.swg
+ *
+ * This file contains the runtime support for Lua modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+ 
+#include "lib/lua/lua.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//#include "lua.h"
+//#include "lauxlib.h"
+#include <stdlib.h>  /* for malloc */
+#include <assert.h>  /* for a few sanity tests */
+
+/* -----------------------------------------------------------------------------
+ * Lua flavors
+ * ----------------------------------------------------------------------------- */
+
+#define SWIG_LUA_FLAVOR_LUA 1
+#define SWIG_LUA_FLAVOR_ELUA 2
+#define SWIG_LUA_FLAVOR_ELUAC 3
+
+#if !defined(SWIG_LUA_TARGET)
+# error SWIG_LUA_TARGET not defined
+#endif
+
+#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
+#  define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
+#  define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
+#  define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
+#  define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
+#else /* SWIG_LUA_FLAVOR_LUA */
+#  define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
+#  define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
+#  define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
+#  define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
+#endif
+
+#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
+#  define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
+#  define LSTRVAL LRO_STRVAL
+#endif
+
+/* -----------------------------------------------------------------------------
+ * compatibility defines
+ * ----------------------------------------------------------------------------- */
+
+/* History of Lua C API length functions:  In Lua 5.0 (and before?)
+   there was "lua_strlen".  In Lua 5.1, this was renamed "lua_objlen",
+   but a compatibility define of "lua_strlen" was added.  In Lua 5.2,
+   this function was again renamed, to "lua_rawlen" (to emphasize that
+   it doesn't call the "__len" metamethod), and the compatibility
+   define of lua_strlen was removed.  All SWIG uses have been updated
+   to "lua_rawlen", and we add our own defines of that here for older
+   versions of Lua.  */
+#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
+# define lua_rawlen lua_strlen
+#elif LUA_VERSION_NUM == 501
+# define lua_rawlen lua_objlen
+#endif
+
+
+/* lua_pushglobaltable is the recommended "future-proof" way to get
+   the global table for Lua 5.2 and later.  Here we define
+   lua_pushglobaltable ourselves for Lua versions before 5.2.  */
+#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
+# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
+#endif
+
+
+/* --------------------------------------------------------------------------
+ * Helper functions for error handling
+ * -------------------------------------------------------------------------- */
+
+/* Push the string STR on the Lua stack, like lua_pushstring, but
+   prefixed with the the location of the innermost Lua call-point
+   (as formated by luaL_where).  */
+SWIGRUNTIME void
+SWIG_Lua_pusherrstring (lua_State *L, const char *str)
+{
+  luaL_where (L, 1);
+  lua_pushstring (L, str);
+  lua_concat (L, 2);
+}
+
+/* Push a formatted string generated from FMT and following args on
+   the Lua stack, like lua_pushfstring, but prefixed with the the
+   location of the innermost Lua call-point (as formated by luaL_where).  */
+SWIGRUNTIME void
+SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
+{
+  va_list argp;
+  va_start(argp, fmt);
+  luaL_where(L, 1);
+  lua_pushvfstring(L, fmt, argp);
+  va_end(argp);
+  lua_concat(L, 2);
+}
+
+
+/* -----------------------------------------------------------------------------
+ * global swig types
+ * ----------------------------------------------------------------------------- */
+/* Constant table */
+#define SWIG_LUA_INT     1
+#define SWIG_LUA_FLOAT   2
+#define SWIG_LUA_STRING  3
+#define SWIG_LUA_POINTER 4
+#define SWIG_LUA_BINARY  5
+#define SWIG_LUA_CHAR    6
+
+/* Structure for variable linking table */
+typedef struct {
+  const char *name;
+  lua_CFunction get;
+  lua_CFunction set;
+} swig_lua_var_info;
+
+/* Constant information structure */
+typedef struct {
+    int type;
+    char *name;
+    long lvalue;
+    double dvalue;
+    void   *pvalue;
+    swig_type_info **ptype;
+} swig_lua_const_info;
+
+typedef struct {
+  const char     *name;
+  lua_CFunction   method;
+} swig_lua_method;
+
+typedef struct {
+  const char     *name;
+  lua_CFunction   getmethod;
+  lua_CFunction   setmethod;
+} swig_lua_attribute;
+
+// Can be used to create namespaces. Currently used to
+// wrap class static methods/variables/constants
+typedef struct {
+  const char            *name;
+  swig_lua_method       *ns_methods;
+  swig_lua_attribute    *ns_attributes;
+  swig_lua_const_info   *ns_constants;
+} swig_lua_namespace;
+
+typedef struct swig_lua_class {
+  const char    *name;
+  swig_type_info   **type;
+  lua_CFunction  constructor;
+  void    (*destructor)(void *);
+  swig_lua_method   *methods;
+  swig_lua_attribute     *attributes;
+  swig_lua_namespace    cls_static;
+  struct swig_lua_class **bases;
+  const char **base_names;
+} swig_lua_class;
+
+/* this is the struct for wrapping all pointers in SwigLua
+*/
+typedef struct {
+  swig_type_info   *type;
+  int     own;  /* 1 if owned & must be destroyed */
+  void        *ptr;
+} swig_lua_userdata;
+
+/* this is the struct for wrapping arbitrary packed binary data
+(currently it is only used for member function pointers)
+the data ordering is similar to swig_lua_userdata, but it is currently not possible
+to tell the two structures apart within SWIG, other than by looking at the type
+*/
+typedef struct {
+  swig_type_info   *type;
+  int     own;  /* 1 if owned & must be destroyed */
+  char data[1];       /* arbitary amount of data */    
+} swig_lua_rawdata;
+
+/* Common SWIG API */
+#define SWIG_NewPointerObj(L, ptr, type, owner)       SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
+#define SWIG_ConvertPtr(L,idx, ptr, type, flags)    SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
+#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname)  SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(L, idx, ptr, sz, ty)       SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
+#define SWIG_NewMemberObj(L, ptr, sz, type)      SWIG_Lua_NewPackedObj(L, ptr, sz, type)
+
+/* Runtime API */
+#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
+#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
+#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
+
+/* Contract support */
+#define SWIG_contract_assert(expr, msg)  \
+  if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } else
+
+
+/* helper #defines */
+#define SWIG_fail {goto fail;}
+#define SWIG_fail_arg(func_name,argnum,type) \
+  {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
+  func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
+  goto fail;}
+#define SWIG_fail_ptr(func_name,argnum,type) \
+  SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
+#define SWIG_check_num_args(func_name,a,b) \
+  if (lua_gettop(L)<a || lua_gettop(L)>b) \
+  {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
+  goto fail;}
+
+
+#define SWIG_Lua_get_table(L,n) \
+  (lua_pushstring(L, n), lua_rawget(L,-2))
+
+#define SWIG_Lua_add_function(L,n,f) \
+  (lua_pushstring(L, n), \
+      lua_pushcfunction(L, f), \
+      lua_rawset(L,-3))
+
+/* special helper for allowing 'nil' for usertypes */
+#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
+
+#ifdef __cplusplus
+/* Special helper for member function pointers 
+it gets the address, casts it, then dereferences it */
+//#define SWIG_mem_fn_as_voidptr(a)  (*((char**)&(a)))
+#endif
+
+/* storing/access of swig_module_info */
+SWIGRUNTIME swig_module_info *
+SWIG_Lua_GetModule(lua_State* L) {
+  swig_module_info *ret = 0;
+  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
+  lua_rawget(L,LUA_REGISTRYINDEX);
+  if (lua_islightuserdata(L,-1))
+    ret=(swig_module_info*)lua_touserdata(L,-1);
+  lua_pop(L,1);  /* tidy */
+  return ret;
+}
+
+SWIGRUNTIME void
+SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
+  /* add this all into the Lua registry: */
+  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
+  lua_pushlightuserdata(L,(void*)module);
+  lua_rawset(L,LUA_REGISTRYINDEX);
+}
+
+/* -----------------------------------------------------------------------------
+ * global variable support code: modules
+ * ----------------------------------------------------------------------------- */
+
+/* this function is called when trying to set an immutable.
+default action is to print an error.
+This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
+SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L)
+{
+/*  there should be 1 param passed in: the new value */
+#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
+  lua_pop(L,1);  /* remove it */
+  luaL_error(L,"This variable is immutable");
+#endif
+    return 0;   /* should not return anything */
+}
+
+/* the module.get method used for getting linked data */
+SWIGINTERN int SWIG_Lua_module_get(lua_State* L)
+{
+/*  there should be 2 params passed in
+  (1) table (not the meta table)
+  (2) string name of the attribute
+  printf("SWIG_Lua_module_get %p(%s) '%s'\n",
+   lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
+   lua_tostring(L,2));
+*/
+  /* get the metatable */
+#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
+  assert(lua_isrotable(L,1)); /* just in case */
+#else
+  assert(lua_istable(L,1)); /* default Lua action */
+#endif
+  lua_getmetatable(L,1);  /* get the metatable */
+#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
+  assert(lua_isrotable(L,-1));  /* just in case */
+#else
+  assert(lua_istable(L,-1));
+#endif
+  SWIG_Lua_get_table(L,".get");  /* get the .get table */
+  lua_remove(L,3);  /* remove metatable */
+#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
+  if (lua_isrotable(L,-1))
+#else
+  if (lua_istable(L,-1))
+#endif
+  {
+    /* look for the key in the .get table */
+    lua_pushvalue(L,2);  /* key */
+    lua_rawget(L,-2);
+    lua_remove(L,3);  /* remove .get */
+    if (lua_iscfunction(L,-1))
+    {  /* found it so call the fn & return its value */
+      lua_call(L,0,1);
+      return 1;
+    }
+    lua_pop(L,1);  /* remove the top */
+  }
+  lua_pop(L,1);  /* remove the .get */
+  lua_pushnil(L);  /* return a nil */
+  return 1;
+}
+
+/* the module.set method used for setting linked data */
+SWIGINTERN int SWIG_Lua_module_set(lua_State* L)
+{
+/*  there should be 3 params passed in
+  (1) table (not the meta table)
+  (2) string name of the attribute
+  (3) any for the new value
+*/
+  /* get the metatable */
+#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
+  assert(lua_isrotable(L,1));  /* just in case */
+#else
+  assert(lua_istable(L,1)); /* default Lua action */
+#endif
+  lua_getmetatable(L,1);  /* get the metatable */
+#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
+  assert(lua_isrotable(L,-1));  /* just in case */
+#else
+  assert(lua_istable(L,-1));
+#endif
+  SWIG_Lua_get_table(L,".set");  /* get the .set table */
+  lua_remove(L,4);  /* remove metatable */
+#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
+  if (lua_isrotable(L,-1))
+#else
+  if (lua_istable(L,-1))
+#endif
+  {
+    /* look for the key in the .set table */
+    lua_pushvalue(L,2);  /* key */
+    lua_rawget(L,-2);
+    lua_remove(L,4);  /* remove .set */
+    if (lua_iscfunction(L,-1))
+    {  /* found it so call the fn & return its value */
+      lua_pushvalue(L,3);  /* value */
+      lua_call(L,1,0);
+      return 0;
+    }
+#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) 
+    else {
+      return 0; // Exits stoically if an invalid key is initialized.
+    }
+#endif
+  }
+  lua_settop(L,3);  /* reset back to start */
+  /* we now have the table, key & new value, so just set directly */
+  lua_rawset(L,1);  /* add direct */
+  return 0;
+}
+
+#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
+/* registering a module in lua. Pushes the module table on the stack. */
+SWIGINTERN void  SWIG_Lua_module_begin(lua_State* L,const char* name)
+{
+  assert(lua_istable(L,-1));  /* just in case */
+  lua_pushstring(L,name);
+  lua_newtable(L);   /* the table */
+  /* add meta table */
+  lua_newtable(L);    /* the meta table */
+  SWIG_Lua_add_function(L,"__index",SWIG_Lua_module_get);
+  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_module_set);
+  lua_pushstring(L,".get");
+  lua_newtable(L);    /* the .get table */
+  lua_rawset(L,-3);  /* add .get into metatable */
+  lua_pushstring(L,".set");
+  lua_newtable(L);    /* the .set table */
+  lua_rawset(L,-3);  /* add .set into metatable */
+  lua_setmetatable(L,-2);  /* sets meta table in module */
+#ifdef SWIG_LUA_MODULE_GLOBAL
+  /* If requested, install the module directly into the global namespace. */
+  lua_rawset(L,-3);        /* add module into parent */
+  SWIG_Lua_get_table(L,name);   /* get the table back out */
+#else
+  /* Do not install the module table as global name. The stack top has
+     the module table with the name below. We pop the top and replace
+     the name with it. */
+  lua_replace(L,-2);
+#endif
+}
+
+/* ending the register */
+SWIGINTERN void  SWIG_Lua_module_end(lua_State* L)
+{
+  lua_pop(L,1);       /* tidy stack (remove module) */
+}
+
+/* adding a linked variable to the module */
+SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
+{
+  assert(lua_istable(L,-1));  /* just in case */
+  lua_getmetatable(L,-1);  /* get the metatable */
+  assert(lua_istable(L,-1));  /* just in case */
+  SWIG_Lua_get_table(L,".get"); /* find the .get table */
+  assert(lua_istable(L,-1));  /* should be a table: */
+  SWIG_Lua_add_function(L,name,getFn);
+  lua_pop(L,1);       /* tidy stack (remove table) */
+  if (setFn)  /* if there is a set fn */
+  {
+    SWIG_Lua_get_table(L,".set"); /* find the .set table */
+    assert(lua_istable(L,-1));  /* should be a table: */
+    SWIG_Lua_add_function(L,name,setFn);
+    lua_pop(L,1);       /* tidy stack (remove table) */
+  }
+  lua_pop(L,1);       /* tidy stack (remove meta) */
+}
+#endif
+
+/* adding a function module */
+SWIGINTERN void  SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
+{
+  SWIG_Lua_add_function(L,name,fn);
+}
+
+/* -----------------------------------------------------------------------------
+ * global variable support code: namespaces
+ * ----------------------------------------------------------------------------- */
+
+SWIGINTERN int SWIG_Lua_namespace_get(lua_State* L)
+{
+/*  there should be 2 params passed in
+  (1) table (not the meta table)
+  (2) string name of the attribute
+*/
+  assert(lua_istable(L,-2));  /* just in case */
+  lua_getmetatable(L,-2);
+  assert(lua_istable(L,-1));
+  SWIG_Lua_get_table(L,".get"); /* find the .get table */
+  assert(lua_istable(L,-1));
+  /* look for the key in the .get table */
+  lua_pushvalue(L,2);  /* key */
+  lua_rawget(L,-2);
+  lua_remove(L,-2); /* stack tidy, remove .get table */
+  if (lua_iscfunction(L,-1))
+  {  /* found it so call the fn & return its value */
+    lua_call(L,0,1);  /* 1 value in (userdata),1 out (result) */
+    lua_remove(L,-2); /* stack tidy, remove metatable */
+    return 1;
+  }
+  lua_pop(L,1);  /* remove whatever was there */
+  /* ok, so try the .fn table */
+  SWIG_Lua_get_table(L,".fn"); /* find the .get table */
+  assert(lua_istable(L,-1));  /* just in case */
+  lua_pushvalue(L,2);  /* key */
+  lua_rawget(L,-2);  /* look for the fn */
+  lua_remove(L,-2); /* stack tidy, remove .fn table */
+  if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
+  {  /* found it so return the fn & let lua call it */
+    lua_remove(L,-2); /* stack tidy, remove metatable */
+    return 1;
+  }
+  lua_pop(L,1);  /* remove whatever was there */
+  return 0;
+}
+
+SWIGINTERN int SWIG_Lua_namespace_set(lua_State* L)
+{
+/*  there should be 3 params passed in
+  (1) table (not the meta table)
+  (2) string name of the attribute
+  (3) any for the new value
+*/
+
+  assert(lua_istable(L,1));
+  lua_getmetatable(L,1);    /* get the meta table */
+  assert(lua_istable(L,-1));
+
+  SWIG_Lua_get_table(L,".set"); /* find the .set table */
+  if (lua_istable(L,-1))
+  {
+    /* look for the key in the .set table */
+    lua_pushvalue(L,2);  /* key */
+    lua_rawget(L,-2);
+    if (lua_iscfunction(L,-1))
+    {  /* found it so call the fn & return its value */
+      lua_pushvalue(L,3);  /* value */
+      lua_call(L,1,0);
+      return 0;
+    }
+    lua_pop(L,1);  /* remove the value */
+  }
+  lua_pop(L,1);  /* remove the value .set table */
+  return 0;
+}
+
+SWIGINTERN void SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]); // forward declaration
+SWIGINTERN void  SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn); // forward declaration
+
+/* helper function - register namespace methods and attributes into namespace */
+SWIGINTERN void SWIG_Lua_add_namespace_details(lua_State* L, swig_lua_namespace* ns)
+{
+  int i = 0;
+  assert(lua_istable(L,-1));
+  /* There must be table at the top of the stack */
+  SWIG_Lua_InstallConstants(L, ns->ns_constants);
+
+  lua_getmetatable(L,-1);
+
+  /* add fns */
+  for(i=0;ns->ns_attributes[i].name;i++){
+    SWIG_Lua_add_class_variable(L,ns->ns_attributes[i].name,ns->ns_attributes[i].getmethod,ns->ns_attributes[i].setmethod);
+  }
+
+  /* add methods to the metatable */
+  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
+  assert(lua_istable(L,-1));  /* just in case */
+  for(i=0;ns->ns_methods[i].name;i++){
+    SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].method);
+  }
+  lua_pop(L,1);
+
+  /* clear stack - remove metatble */
+  lua_pop(L,1);
+
+}
+
+/* helper function. creates namespace table and add it to module table */
+SWIGINTERN void SWIG_Lua_namespace_register(lua_State* L, swig_lua_namespace* ns)
+{
+  assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table */
+  lua_checkstack(L,5);
+  lua_pushstring(L, ns->name);
+  lua_newtable(L); /* namespace itself */
+  lua_newtable(L); /* metatable for namespace */
+
+  /* add a table called ".get" */
+  lua_pushstring(L,".get");
+  lua_newtable(L);
+  lua_rawset(L,-3);
+  /* add a table called ".set" */
+  lua_pushstring(L,".set");
+  lua_newtable(L);
+  lua_rawset(L,-3);
+  /* add a table called ".fn" */
+  lua_pushstring(L,".fn");
+  lua_newtable(L);
+  lua_rawset(L,-3);
+
+  /* add accessor fns for using the .get,.set&.fn */
+  SWIG_Lua_add_function(L,"__index",SWIG_Lua_namespace_get);
+  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_namespace_set);
+
+  lua_setmetatable(L,-2); /* set metatable */
+  lua_rawset(L,-3); /* add namespace to module table */
+}
+/* -----------------------------------------------------------------------------
+ * global variable support code: classes
+ * ----------------------------------------------------------------------------- */
+
+/* the class.get method, performs the lookup of class attributes */
+SWIGINTERN int  SWIG_Lua_class_get(lua_State* L)
+{
+/*  there should be 2 params passed in
+  (1) userdata (not the meta table)
+  (2) string name of the attribute
+*/
+  assert(lua_isuserdata(L,-2));  /* just in case */
+  lua_getmetatable(L,-2);    /* get the meta table */
+  assert(lua_istable(L,-1));  /* just in case */
+  SWIG_Lua_get_table(L,".get"); /* find the .get table */
+  assert(lua_istable(L,-1));  /* just in case */
+  /* look for the key in the .get table */
+  lua_pushvalue(L,2);  /* key */
+  lua_rawget(L,-2);
+  lua_remove(L,-2); /* stack tidy, remove .get table */
+  if (lua_iscfunction(L,-1))
+  {  /* found it so call the fn & return its value */
+    lua_pushvalue(L,1);  /* the userdata */
+    lua_call(L,1,1);  /* 1 value in (userdata),1 out (result) */
+    lua_remove(L,-2); /* stack tidy, remove metatable */
+    return 1;
+  }
+  lua_pop(L,1);  /* remove whatever was there */
+  /* ok, so try the .fn table */
+  SWIG_Lua_get_table(L,".fn"); /* find the .get table */
+  assert(lua_istable(L,-1));  /* just in case */
+  lua_pushvalue(L,2);  /* key */
+  lua_rawget(L,-2);  /* look for the fn */
+  lua_remove(L,-2); /* stack tidy, remove .fn table */
+  if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
+  {  /* found it so return the fn & let lua call it */
+    lua_remove(L,-2); /* stack tidy, remove metatable */
+    return 1;
+  }
+  lua_pop(L,1);  /* remove whatever was there */
+  /* NEW: looks for the __getitem() fn
+  this is a user provided get fn */
+  SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
+  if (lua_iscfunction(L,-1))  /* if its there */
+  {  /* found it so call the fn & return its value */
+    lua_pushvalue(L,1);  /* the userdata */
+    lua_pushvalue(L,2);  /* the parameter */
+    lua_call(L,2,1);  /* 2 value in (userdata),1 out (result) */
+    lua_remove(L,-2); /* stack tidy, remove metatable */
+    return 1;
+  }
+  return 0;  /* sorry not known */
+}
+
+/* the class.set method, performs the lookup of class attributes */
+SWIGINTERN int  SWIG_Lua_class_set(lua_State* L)
+{
+/*  there should be 3 params passed in
+  (1) table (not the meta table)
+  (2) string name of the attribute
+  (3) any for the new value
+printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n",
+      lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
+      lua_tostring(L,2),
+      lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/
+
+  assert(lua_isuserdata(L,1));  /* just in case */
+  lua_getmetatable(L,1);    /* get the meta table */
+  assert(lua_istable(L,-1));  /* just in case */
+
+  SWIG_Lua_get_table(L,".set"); /* find the .set table */
+  if (lua_istable(L,-1))
+  {
+    /* look for the key in the .set table */
+    lua_pushvalue(L,2);  /* key */
+    lua_rawget(L,-2);
+    if (lua_iscfunction(L,-1))
+    {  /* found it so call the fn & return its value */
+      lua_pushvalue(L,1);  /* userdata */
+      lua_pushvalue(L,3);  /* value */
+      lua_call(L,2,0);
+      return 0;
+    }
+    lua_pop(L,1);  /* remove the value */
+  }
+  lua_pop(L,1);  /* remove the value .set table */
+  /* NEW: looks for the __setitem() fn
+  this is a user provided set fn */
+  SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
+  if (lua_iscfunction(L,-1))  /* if its there */
+  {  /* found it so call the fn & return its value */
+    lua_pushvalue(L,1);  /* the userdata */
+    lua_pushvalue(L,2);  /* the parameter */
+    lua_pushvalue(L,3);  /* the value */
+    lua_call(L,3,0);  /* 3 values in ,0 out */
+    lua_remove(L,-2); /* stack tidy, remove metatable */
+    return 1;
+  }
+  return 0;
+}
+
+/* the class.destruct method called by the interpreter */
+SWIGINTERN int  SWIG_Lua_class_destruct(lua_State* L)
+{
+/*  there should be 1 params passed in
+  (1) userdata (not the meta table) */
+  swig_lua_userdata* usr;
+  swig_lua_class* clss;
+  assert(lua_isuserdata(L,-1));  /* just in case */
+  usr=(swig_lua_userdata*)lua_touserdata(L,-1);  /* get it */
+  /* if must be destroyed & has a destructor */
+  if (usr->own) /* if must be destroyed */
+  {
+    clss=(swig_lua_class*)usr->type->clientdata;  /* get the class */
+    if (clss && clss->destructor)  /* there is a destroy fn */
+    {
+      clss->destructor(usr->ptr);  /* bye bye */
+    }
+  }
+  return 0;
+}
+
+/* the class.__tostring method called by the interpreter and print */
+SWIGINTERN int  SWIG_Lua_class_tostring(lua_State* L)
+{
+/*  there should be 1 param passed in
+  (1) userdata (not the metatable) */
+  assert(lua_isuserdata(L,1));  /* just in case */
+  unsigned long userData = (unsigned long)lua_touserdata(L,1); /* get the userdata address for later */
+  lua_getmetatable(L,1);    /* get the meta table */
+  assert(lua_istable(L,-1));  /* just in case */
+  
+  lua_getfield(L, -1, ".type");
+  const char* className = lua_tostring(L, -1);
+  
+  char output[256];
+  sprintf(output, "<%s userdata: %lX>", className, userData);
+  
+  lua_pushstring(L, (const char*)output);
+  return 1;
+}
+
+/* to manually disown some userdata */
+SWIGINTERN int  SWIG_Lua_class_disown(lua_State* L)
+{
+/*  there should be 1 params passed in
+  (1) userdata (not the meta table) */
+  swig_lua_userdata* usr;
+  assert(lua_isuserdata(L,-1));  /* just in case */
+  usr=(swig_lua_userdata*)lua_touserdata(L,-1);  /* get it */
+  
+  usr->own = 0; /* clear our ownership */
+  return 0;
+}
+
+/* Constructor proxy. Used when class name entry in module is not class constructor,
+but special table instead. */
+SWIGINTERN int SWIG_Lua_constructor_proxy(lua_State* L)
+{
+  /* unlimited number of parameters
+     First one is our proxy table and we should remove it
+     Other we should pass to real constructor
+   */
+   assert(lua_istable(L,1));
+   lua_pushstring(L,".constructor");
+   lua_rawget(L,1);
+   assert(!lua_isnil(L,-1));
+   lua_replace(L,1); /* replace our table with real constructor */
+   lua_call(L,lua_gettop(L)-1,1);
+   return 1;
+}
+
+/* gets the swig class registry (or creates it) */
+SWIGINTERN void  SWIG_Lua_get_class_registry(lua_State* L)
+{
+  /* add this all into the swig registry: */
+  lua_pushstring(L,"SWIG");
+  lua_rawget(L,LUA_REGISTRYINDEX);  /* get the registry */
+  if (!lua_istable(L,-1))  /* not there */
+  {  /* must be first time, so add it */
+    lua_pop(L,1);  /* remove the result */
+    lua_pushstring(L,"SWIG");
+    lua_newtable(L);
+    lua_rawset(L,LUA_REGISTRYINDEX);
+    /* then get it */
+    lua_pushstring(L,"SWIG");
+    lua_rawget(L,LUA_REGISTRYINDEX);
+  }
+}
+
+/* helper fn to get the classes metatable from the register */
+SWIGINTERN void  SWIG_Lua_get_class_metatable(lua_State* L,const char* cname)
+{
+  SWIG_Lua_get_class_registry(L);  /* get the registry */
+  lua_pushstring(L,cname);  /* get the name */
+  lua_rawget(L,-2);    /* get it */
+  lua_remove(L,-2);    /* tidy up (remove registry) */
+}
+
+/* helper add a variable to a registered class */
+SWIGINTERN void  SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
+{
+  assert(lua_istable(L,-1));  /* just in case */
+  SWIG_Lua_get_table(L,".get"); /* find the .get table */
+  assert(lua_istable(L,-1));  /* just in case */
+  SWIG_Lua_add_function(L,name,getFn);
+  lua_pop(L,1);       /* tidy stack (remove table) */
+  if (setFn)
+  {
+    SWIG_Lua_get_table(L,".set"); /* find the .set table */
+    assert(lua_istable(L,-1));  /* just in case */
+    SWIG_Lua_add_function(L,name,setFn);
+    lua_pop(L,1);       /* tidy stack (remove table) */
+  }
+}
+
+/* helper to recursively add class static details (static attributes, operations and constants) */
+SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State* L, swig_lua_class* clss)
+{
+  int i = 0;
+  /* The class namespace table must be on the top of the stack */
+  assert(lua_istable(L,-1));
+  /* call all the base classes first: we can then override these later: */
+  for(i=0;clss->bases[i];i++)
+  {
+    SWIG_Lua_add_class_static_details(L,clss->bases[i]);
+  }
+
+  SWIG_Lua_add_namespace_details(L, &clss->cls_static);
+}
+
+/* helper to recursively add class details (attributes & operations) */
+SWIGINTERN void  SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss)
+{
+  int i;
+  /* call all the base classes first: we can then override these later: */
+  for(i=0;clss->bases[i];i++)
+  {
+    SWIG_Lua_add_class_details(L,clss->bases[i]);
+  }
+  /* add fns */
+  for(i=0;clss->attributes[i].name;i++){
+    SWIG_Lua_add_class_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod);
+  }
+  /* add methods to the metatable */
+  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
+  assert(lua_istable(L,-1));  /* just in case */
+  for(i=0;clss->methods[i].name;i++){
+    SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
+  }
+  lua_pop(L,1);       /* tidy stack (remove table) */
+  /*   add operator overloads
+    these look ANY method which start with "__" and assume they
+    are operator overloads & add them to the metatable
+    (this might mess up is someone defines a method __gc (the destructor)*/
+  for(i=0;clss->methods[i].name;i++){
+    if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){
+      SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
+    }
+  }
+}
+
+/* set up the base classes pointers.
+Each class structure has a list of pointers to the base class structures.
+This function fills them.
+It cannot be done at compile time, as this will not work with hireachies
+spread over more than one swig file. 
+Therefore it must be done at runtime, querying the SWIG type system.
+*/
+SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss)
+{
+  int i=0;
+  swig_module_info* module=SWIG_GetModule(L);
+  for(i=0;clss->base_names[i];i++)
+  {
+    if (clss->bases[i]==0) /* not found yet */
+    {
+      /* lookup and cache the base class */
+      swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
+      if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
+    }
+  }
+}
+
+/* Register class static methods,attributes etc as well as constructor proxy */
+SWIGINTERN void SWIG_Lua_class_register_static(lua_State* L, swig_lua_class* clss)
+{
+  lua_checkstack(L,5); /* just in case */
+  assert(lua_istable(L,-1));  /* just in case */
+  assert(strcmp(clss->name, clss->cls_static.name) == 0); /* in class those 2 must be equal */
+
+  SWIG_Lua_namespace_register(L,&clss->cls_static);
+
+  SWIG_Lua_get_table(L,clss->name); // Get namespace table back
+  assert(lua_istable(L,-1)); /* just in case */
+
+  /*  add its constructor to module with the name of the class
+  so you can do MyClass(...) as well as new_MyClass(...)
+  BUT only if a constructor is defined
+  (this overcomes the problem of pure virtual classes without constructors)*/
+  if (clss->constructor)
+  {
+    SWIG_Lua_add_function(L,".constructor", clss->constructor);
+    lua_getmetatable(L,-1);
+    assert(lua_istable(L,-1)); /* just in case */
+    SWIG_Lua_add_function(L,"__call", SWIG_Lua_constructor_proxy);
+    lua_pop(L,1);
+  }
+
+  assert(lua_istable(L,-1)); /* just in case */
+  SWIG_Lua_add_class_static_details(L, clss);
+
+  /* clear stack */
+  lua_pop(L,1);
+}
+
+/* performs the entire class registration process */
+SWIGINTERN void  SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss)
+{
+  SWIG_Lua_class_register_static(L,clss);
+
+  SWIG_Lua_get_class_registry(L);  /* get the registry */
+  lua_pushstring(L,clss->name);  /* get the name */
+  lua_newtable(L);    /* create the metatable */
+  /* add string of class name called ".type" */
+  lua_pushstring(L,".type");
+  lua_pushstring(L,clss->name);
+  lua_rawset(L,-3);
+  /* add a table called ".get" */
+  lua_pushstring(L,".get");
+  lua_newtable(L);
+  lua_rawset(L,-3);
+  /* add a table called ".set" */
+  lua_pushstring(L,".set");
+  lua_newtable(L);
+  lua_rawset(L,-3);
+  /* add a table called ".fn" */
+  lua_pushstring(L,".fn");
+  lua_newtable(L);
+  /* add manual disown method */
+  SWIG_Lua_add_function(L,"__disown",SWIG_Lua_class_disown);
+  lua_rawset(L,-3);
+  /* add accessor fns for using the .get,.set&.fn */
+  SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
+  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
+  SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
+  /* add tostring method for better output */
+  SWIG_Lua_add_function(L,"__tostring",SWIG_Lua_class_tostring);
+  /* add it */
+  lua_rawset(L,-3);  /* metatable into registry */
+  lua_pop(L,1);      /* tidy stack (remove registry) */
+
+  SWIG_Lua_get_class_metatable(L,clss->name);
+  SWIG_Lua_add_class_details(L,clss);  /* recursive adding of details (atts & ops) */
+  lua_pop(L,1);      /* tidy stack (remove class metatable) */
+}
+
+/* -----------------------------------------------------------------------------
+ * Class/structure conversion fns
+ * ----------------------------------------------------------------------------- */
+
+/* helper to add metatable to new lua object */
+SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State* L,swig_type_info *type)
+{
+  if (type->clientdata)  /* there is clientdata: so add the metatable */
+  {
+    SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->name);
+    if (lua_istable(L,-1))
+    {
+      lua_setmetatable(L,-2);
+    }
+    else
+    {
+      lua_pop(L,1);
+    }
+  }
+}
+
+/* pushes a new object into the lua stack */
+SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own)
+{
+  swig_lua_userdata* usr;
+  if (!ptr){
+    lua_pushnil(L);
+    return;
+  }
+  usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata));  /* get data */
+  usr->ptr=ptr;  /* set the ptr */
+  usr->type=type;
+  usr->own=own;
+#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
+  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
+#endif
+}
+
+/* takes a object from the lua stack & converts it into an object of the correct type
+ (if possible) */
+SWIGRUNTIME int  SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags)
+{
+  swig_lua_userdata* usr;
+  swig_cast_info *cast;
+  if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;}    /* special case: lua nil => NULL pointer */
+  usr=(swig_lua_userdata*)lua_touserdata(L,index);  /* get data */
+  if (usr)
+  {
+    if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
+    {
+        usr->own=0;
+    }
+    if (!type)            /* special cast void*, no casting fn */
+    {
+      *ptr=usr->ptr;
+      return SWIG_OK; /* ok */
+    }
+    cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */
+    if (cast)
+    {
+      int newmemory = 0;
+      *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
+      assert(!newmemory); /* newmemory handling not yet implemented */
+      return SWIG_OK;  /* ok */
+    }
+  }
+  return SWIG_ERROR;  /* error */
+}
+
+SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags,
+       int argnum,const char* func_name){
+  void* result;
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
+    luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
+		func_name,(type && type->str)?type->str:"void*",argnum);
+  }
+  return result;
+}
+
+/* pushes a packed userdata. user for member fn pointers only */
+SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type)
+{
+  swig_lua_rawdata* raw;
+  assert(ptr); /* not acceptable to pass in a NULL value */
+  raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size);  /* alloc data */
+  raw->type=type;
+  raw->own=0;
+  memcpy(raw->data,ptr,size); /* copy the data */
+  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
+}
+    
+/* converts a packed userdata. user for member fn pointers only */
+SWIGRUNTIME int  SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type)
+{
+  swig_lua_rawdata* raw;
+  raw=(swig_lua_rawdata*)lua_touserdata(L,index);  /* get data */
+  if (!raw) return SWIG_ERROR;  /* error */
+  if (type==0 || type==raw->type) /* void* or identical type */
+  {
+    memcpy(ptr,raw->data,size); /* copy it */
+    return SWIG_OK; /* ok */
+  }
+  return SWIG_ERROR;  /* error */
+}
+
+/* a function to get the typestring of a piece of data */
+SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
+{
+  swig_lua_userdata* usr;
+  if (lua_isuserdata(L,tp))
+  {
+    usr=(swig_lua_userdata*)lua_touserdata(L,tp);  /* get data */
+    if (usr && usr->type && usr->type->str)
+      return usr->type->str;
+    return "userdata (unknown type)";
+  }
+  return lua_typename(L,lua_type(L,tp));
+}
+
+/* lua callable function to get the userdata's type */
+SWIGRUNTIME int SWIG_Lua_type(lua_State* L)
+{
+  lua_pushstring(L,SWIG_Lua_typename(L,1));
+  return 1;
+}
+
+/* lua callable function to compare userdata's value
+the issue is that two userdata may point to the same thing
+but to lua, they are different objects */
+SWIGRUNTIME int SWIG_Lua_equal(lua_State* L)
+{
+  int result;
+  swig_lua_userdata *usr1,*usr2;
+  if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2))  /* just in case */
+    return 0;  /* nil reply */
+  usr1=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
+  usr2=(swig_lua_userdata*)lua_touserdata(L,2);  /* get data */
+  /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
+  result=(usr1->ptr==usr2->ptr);
+   lua_pushboolean(L,result);
+  return 1;
+}
+
+/* -----------------------------------------------------------------------------
+ * global variable support code: class/struct typemap functions
+ * ----------------------------------------------------------------------------- */
+
+#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
+/* Install Constants */
+SWIGINTERN void
+SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) {
+  int i;
+  for (i = 0; constants[i].type; i++) {
+    switch(constants[i].type) {
+    case SWIG_LUA_INT:
+      lua_pushstring(L,constants[i].name);
+      lua_pushnumber(L,(lua_Number)constants[i].lvalue);
+      lua_rawset(L,-3);
+      break;
+    case SWIG_LUA_FLOAT:
+      lua_pushstring(L,constants[i].name);
+      lua_pushnumber(L,(lua_Number)constants[i].dvalue);
+      lua_rawset(L,-3);
+      break;
+    case SWIG_LUA_CHAR:
+      lua_pushstring(L,constants[i].name);
+      lua_pushfstring(L,"%c",(char)constants[i].lvalue);
+      lua_rawset(L,-3);
+      break;
+    case SWIG_LUA_STRING:
+      lua_pushstring(L,constants[i].name);
+      lua_pushstring(L,(char *) constants[i].pvalue);
+      lua_rawset(L,-3);
+      break;
+    case SWIG_LUA_POINTER:
+      lua_pushstring(L,constants[i].name);
+      SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
+      lua_rawset(L,-3);
+      break;
+    case SWIG_LUA_BINARY:
+      lua_pushstring(L,constants[i].name);
+      SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
+      lua_rawset(L,-3);
+      break;
+    default:
+      break;
+    }
+  }
+}
+#endif
+
+/* -----------------------------------------------------------------------------
+ * executing lua code from within the wrapper
+ * ----------------------------------------------------------------------------- */
+
+#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
+#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
+#endif
+/* Executes a C string in Lua which is a really simple way of calling lua from C
+Unfortunately lua keeps changing its APIs, so we need a conditional compile
+In lua 5.0.X its lua_dostring()
+In lua 5.1.X its luaL_dostring()
+*/
+SWIGINTERN int 
+SWIG_Lua_dostring(lua_State *L, const char* str) {
+  int ok,top;
+  if (str==0 || str[0]==0) return 0; /* nothing to do */
+  top=lua_gettop(L); /* save stack */
+#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
+  ok=luaL_dostring(L,str);	/* looks like this is lua 5.1.X or later, good */
+#else
+  ok=lua_dostring(L,str);	/* might be lua 5.0.x, using lua_dostring */
+#endif
+  if (ok!=0) {
+    SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
+  }
+  lua_settop(L,top); /* restore the stack */
+  return ok;
+}    
+
+#ifdef __cplusplus
+}
+#endif
+
+/* ------------------------------ end luarun.swg  ------------------------------ */
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_m_PlayerEquipment__unsigned_int swig_types[0]
+#define SWIGTYPE_m_Player__unsigned___int16 swig_types[1]
+#define SWIGTYPE_m_Player__unsigned_short swig_types[2]
+#define SWIGTYPE_p_Actor swig_types[3]
+#define SWIGTYPE_p_DAMAGE_TYPE swig_types[4]
+#define SWIGTYPE_p_ITEM_EQUIP_TYPE swig_types[5]
+#define SWIGTYPE_p_ItemGen swig_types[6]
+#define SWIGTYPE_p_LloydBeacon swig_types[7]
+#define SWIGTYPE_p_NZIArrayT_Player_p_5_t swig_types[8]
+#define SWIGTYPE_p_Player swig_types[9]
+#define SWIGTYPE_p_PlayerEquipment swig_types[10]
+#define SWIGTYPE_p_PlayerSpellbookChapter swig_types[11]
+#define SWIGTYPE_p_PlayerSpells swig_types[12]
+#define SWIGTYPE_p___int16 swig_types[13]
+#define SWIGTYPE_p_char swig_types[14]
+#define SWIGTYPE_p_int swig_types[15]
+#define SWIGTYPE_p_std__arrayT_LloydBeacon_5_t swig_types[16]
+#define SWIGTYPE_p_std__arrayT_SpellBuff_24_t swig_types[17]
+#define SWIGTYPE_p_std__arrayT___int64_20_t swig_types[18]
+#define SWIGTYPE_p_std__arrayT_char_11_t swig_types[19]
+#define SWIGTYPE_p_std__arrayT_int_126_t swig_types[20]
+#define SWIGTYPE_p_unsigned___int16 swig_types[21]
+#define SWIGTYPE_p_unsigned___int64 swig_types[22]
+#define SWIGTYPE_p_unsigned___int8 swig_types[23]
+#define SWIGTYPE_p_unsigned_char swig_types[24]
+static swig_type_info *swig_types[26];
+static swig_module_info swig_module = {swig_types, 25, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#define SWIG_name      "Player"
+#define SWIG_init      luaopen_Player
+#define SWIG_init_user luaopen_Player_user
+
+#define SWIG_LUACODE   luaopen_Player_luacode
+
+namespace swig {
+typedef struct{} LANGUAGE_OBJ;
+}
+
+
+   #include "Player.h"
+
+
+SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
+  int ret = lua_isstring(L, idx);
+  if (!ret)
+   ret = lua_isnil(L, idx);
+  return ret;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+static int _wrap_LloydBeacon_uBeaconTime_set(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  unsigned __int64 arg2 ;
+  unsigned __int64 *argp2 ;
+  
+  SWIG_check_num_args("LloydBeacon::uBeaconTime",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::uBeaconTime",1,"LloydBeacon *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("LloydBeacon::uBeaconTime",2,"unsigned __int64");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_uBeaconTime_set",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int64,0))){
+    SWIG_fail_ptr("LloydBeacon_uBeaconTime_set",2,SWIGTYPE_p_unsigned___int64);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uBeaconTime = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_uBeaconTime_get(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  unsigned __int64 result;
+  
+  SWIG_check_num_args("LloydBeacon::uBeaconTime",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::uBeaconTime",1,"LloydBeacon *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_uBeaconTime_get",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  result =  ((arg1)->uBeaconTime);
+  {
+    unsigned __int64 * resultptr = new unsigned __int64((const unsigned __int64 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int64,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_PartyPos_X_set(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("LloydBeacon::PartyPos_X",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::PartyPos_X",1,"LloydBeacon *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("LloydBeacon::PartyPos_X",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyPos_X_set",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->PartyPos_X = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_PartyPos_X_get(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("LloydBeacon::PartyPos_X",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::PartyPos_X",1,"LloydBeacon *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyPos_X_get",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  result = (int) ((arg1)->PartyPos_X);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_PartyPos_Y_set(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("LloydBeacon::PartyPos_Y",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::PartyPos_Y",1,"LloydBeacon *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("LloydBeacon::PartyPos_Y",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyPos_Y_set",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->PartyPos_Y = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_PartyPos_Y_get(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("LloydBeacon::PartyPos_Y",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::PartyPos_Y",1,"LloydBeacon *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyPos_Y_get",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  result = (int) ((arg1)->PartyPos_Y);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_PartyPos_Z_set(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("LloydBeacon::PartyPos_Z",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::PartyPos_Z",1,"LloydBeacon *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("LloydBeacon::PartyPos_Z",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyPos_Z_set",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->PartyPos_Z = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_PartyPos_Z_get(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("LloydBeacon::PartyPos_Z",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::PartyPos_Z",1,"LloydBeacon *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyPos_Z_get",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  result = (int) ((arg1)->PartyPos_Z);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_PartyRot_X_set(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("LloydBeacon::PartyRot_X",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::PartyRot_X",1,"LloydBeacon *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("LloydBeacon::PartyRot_X",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyRot_X_set",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyRot_X_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->PartyRot_X = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_PartyRot_X_get(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("LloydBeacon::PartyRot_X",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::PartyRot_X",1,"LloydBeacon *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyRot_X_get",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  result =  ((arg1)->PartyRot_X);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_PartyRot_Y_set(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("LloydBeacon::PartyRot_Y",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::PartyRot_Y",1,"LloydBeacon *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("LloydBeacon::PartyRot_Y",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyRot_Y_set",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyRot_Y_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->PartyRot_Y = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_PartyRot_Y_get(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("LloydBeacon::PartyRot_Y",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::PartyRot_Y",1,"LloydBeacon *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_PartyRot_Y_get",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  result =  ((arg1)->PartyRot_Y);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_SaveFileID_set(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("LloydBeacon::SaveFileID",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::SaveFileID",1,"LloydBeacon *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("LloydBeacon::SaveFileID",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_SaveFileID_set",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->SaveFileID = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_LloydBeacon_SaveFileID_get(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *arg1 = (LloydBeacon *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("LloydBeacon::SaveFileID",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LloydBeacon::SaveFileID",1,"LloydBeacon *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LloydBeacon,0))){
+    SWIG_fail_ptr("LloydBeacon_SaveFileID_get",1,SWIGTYPE_p_LloydBeacon);
+  }
+  
+  result = (int) ((arg1)->SaveFileID);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_new_LloydBeacon(lua_State* L) {
+  int SWIG_arg = 0;
+  LloydBeacon *result = 0 ;
+  
+  SWIG_check_num_args("LloydBeacon::LloydBeacon",0,0)
+  result = (LloydBeacon *)new LloydBeacon();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_LloydBeacon,1); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static void swig_delete_LloydBeacon(void *obj) {
+LloydBeacon *arg1 = (LloydBeacon *) obj;
+delete arg1;
+}
+static swig_lua_method swig_LloydBeacon_methods[] = {
+    {0,0}
+};
+static swig_lua_attribute swig_LloydBeacon_attributes[] = {
+    { "uBeaconTime", _wrap_LloydBeacon_uBeaconTime_get, _wrap_LloydBeacon_uBeaconTime_set},
+    { "PartyPos_X", _wrap_LloydBeacon_PartyPos_X_get, _wrap_LloydBeacon_PartyPos_X_set},
+    { "PartyPos_Y", _wrap_LloydBeacon_PartyPos_Y_get, _wrap_LloydBeacon_PartyPos_Y_set},
+    { "PartyPos_Z", _wrap_LloydBeacon_PartyPos_Z_get, _wrap_LloydBeacon_PartyPos_Z_set},
+    { "PartyRot_X", _wrap_LloydBeacon_PartyRot_X_get, _wrap_LloydBeacon_PartyRot_X_set},
+    { "PartyRot_Y", _wrap_LloydBeacon_PartyRot_Y_get, _wrap_LloydBeacon_PartyRot_Y_set},
+    { "SaveFileID", _wrap_LloydBeacon_SaveFileID_get, _wrap_LloydBeacon_SaveFileID_set},
+    {0,0,0}
+};
+static swig_lua_attribute swig_LloydBeacon_cls_attributes[] = {
+    {0,0,0}
+};
+static swig_lua_method swig_LloydBeacon_cls_methods[] = {
+    {0,0}
+};
+static swig_lua_const_info swig_LloydBeacon_cls_constants[] = {
+    {0,0,0,0,0,0}
+};
+static swig_lua_class *swig_LloydBeacon_bases[] = {0};
+static const char *swig_LloydBeacon_base_names[] = {0};
+static swig_lua_class _wrap_class_LloydBeacon = { "LloydBeacon", &SWIGTYPE_p_LloydBeacon,_wrap_new_LloydBeacon, swig_delete_LloydBeacon, swig_LloydBeacon_methods, swig_LloydBeacon_attributes, { "LloydBeacon", swig_LloydBeacon_cls_methods, swig_LloydBeacon_cls_attributes, swig_LloydBeacon_cls_constants }, swig_LloydBeacon_bases, swig_LloydBeacon_base_names };
+
+static int _wrap_PlayerSpellbookChapter_bIsSpellAvailable_set(lua_State* L) {
+  int SWIG_arg = 0;
+  PlayerSpellbookChapter *arg1 = (PlayerSpellbookChapter *) 0 ;
+  std::array< char,11 > arg2 ;
+  std::array< char,11 > *argp2 ;
+  
+  SWIG_check_num_args("PlayerSpellbookChapter::bIsSpellAvailable",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PlayerSpellbookChapter::bIsSpellAvailable",1,"PlayerSpellbookChapter *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("PlayerSpellbookChapter::bIsSpellAvailable",2,"std::array< char,11 >");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PlayerSpellbookChapter,0))){
+    SWIG_fail_ptr("PlayerSpellbookChapter_bIsSpellAvailable_set",1,SWIGTYPE_p_PlayerSpellbookChapter);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_std__arrayT_char_11_t,0))){
+    SWIG_fail_ptr("PlayerSpellbookChapter_bIsSpellAvailable_set",2,SWIGTYPE_p_std__arrayT_char_11_t);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->bIsSpellAvailable = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_PlayerSpellbookChapter_bIsSpellAvailable_get(lua_State* L) {
+  int SWIG_arg = 0;
+  PlayerSpellbookChapter *arg1 = (PlayerSpellbookChapter *) 0 ;
+  std::array< char,11 > result;
+  
+  SWIG_check_num_args("PlayerSpellbookChapter::bIsSpellAvailable",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PlayerSpellbookChapter::bIsSpellAvailable",1,"PlayerSpellbookChapter *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PlayerSpellbookChapter,0))){
+    SWIG_fail_ptr("PlayerSpellbookChapter_bIsSpellAvailable_get",1,SWIGTYPE_p_PlayerSpellbookChapter);
+  }
+  
+  result =  ((arg1)->bIsSpellAvailable);
+  {
+    std::array< char,11 > * resultptr = new std::array< char,11 >((const std::array< char,11 > &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__arrayT_char_11_t,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_new_PlayerSpellbookChapter(lua_State* L) {
+  int SWIG_arg = 0;
+  PlayerSpellbookChapter *result = 0 ;
+  
+  SWIG_check_num_args("PlayerSpellbookChapter::PlayerSpellbookChapter",0,0)
+  result = (PlayerSpellbookChapter *)new PlayerSpellbookChapter();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_PlayerSpellbookChapter,1); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static void swig_delete_PlayerSpellbookChapter(void *obj) {
+PlayerSpellbookChapter *arg1 = (PlayerSpellbookChapter *) obj;
+delete arg1;
+}
+static swig_lua_method swig_PlayerSpellbookChapter_methods[] = {
+    {0,0}
+};
+static swig_lua_attribute swig_PlayerSpellbookChapter_attributes[] = {
+    { "bIsSpellAvailable", _wrap_PlayerSpellbookChapter_bIsSpellAvailable_get, _wrap_PlayerSpellbookChapter_bIsSpellAvailable_set},
+    {0,0,0}
+};
+static swig_lua_attribute swig_PlayerSpellbookChapter_cls_attributes[] = {
+    {0,0,0}
+};
+static swig_lua_method swig_PlayerSpellbookChapter_cls_methods[] = {
+    {0,0}
+};
+static swig_lua_const_info swig_PlayerSpellbookChapter_cls_constants[] = {
+    {0,0,0,0,0,0}
+};
+static swig_lua_class *swig_PlayerSpellbookChapter_bases[] = {0};
+static const char *swig_PlayerSpellbookChapter_base_names[] = {0};
+static swig_lua_class _wrap_class_PlayerSpellbookChapter = { "PlayerSpellbookChapter", &SWIGTYPE_p_PlayerSpellbookChapter,_wrap_new_PlayerSpellbookChapter, swig_delete_PlayerSpellbookChapter, swig_PlayerSpellbookChapter_methods, swig_PlayerSpellbookChapter_attributes, { "PlayerSpellbookChapter", swig_PlayerSpellbookChapter_cls_methods, swig_PlayerSpellbookChapter_cls_attributes, swig_PlayerSpellbookChapter_cls_constants }, swig_PlayerSpellbookChapter_bases, swig_PlayerSpellbookChapter_base_names };
+
+static int _wrap_new_PlayerSpells(lua_State* L) {
+  int SWIG_arg = 0;
+  PlayerSpells *result = 0 ;
+  
+  SWIG_check_num_args("PlayerSpells::PlayerSpells",0,0)
+  result = (PlayerSpells *)new PlayerSpells();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_PlayerSpells,1); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static void swig_delete_PlayerSpells(void *obj) {
+PlayerSpells *arg1 = (PlayerSpells *) obj;
+delete arg1;
+}
+static swig_lua_method swig_PlayerSpells_methods[] = {
+    {0,0}
+};
+static swig_lua_attribute swig_PlayerSpells_attributes[] = {
+    {0,0,0}
+};
+static swig_lua_attribute swig_PlayerSpells_cls_attributes[] = {
+    {0,0,0}
+};
+static swig_lua_method swig_PlayerSpells_cls_methods[] = {
+    {0,0}
+};
+static swig_lua_const_info swig_PlayerSpells_cls_constants[] = {
+    {0,0,0,0,0,0}
+};
+static swig_lua_class *swig_PlayerSpells_bases[] = {0};
+static const char *swig_PlayerSpells_base_names[] = {0};
+static swig_lua_class _wrap_class_PlayerSpells = { "PlayerSpells", &SWIGTYPE_p_PlayerSpells,_wrap_new_PlayerSpells, swig_delete_PlayerSpells, swig_PlayerSpells_methods, swig_PlayerSpells_attributes, { "PlayerSpells", swig_PlayerSpells_cls_methods, swig_PlayerSpells_cls_attributes, swig_PlayerSpells_cls_constants }, swig_PlayerSpells_bases, swig_PlayerSpells_base_names };
+
+static int _wrap_new_PlayerEquipment(lua_State* L) {
+  int SWIG_arg = 0;
+  PlayerEquipment *result = 0 ;
+  
+  SWIG_check_num_args("PlayerEquipment::PlayerEquipment",0,0)
+  result = (PlayerEquipment *)new PlayerEquipment();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_PlayerEquipment,1); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static void swig_delete_PlayerEquipment(void *obj) {
+PlayerEquipment *arg1 = (PlayerEquipment *) obj;
+delete arg1;
+}
+static swig_lua_method swig_PlayerEquipment_methods[] = {
+    {0,0}
+};
+static swig_lua_attribute swig_PlayerEquipment_attributes[] = {
+    {0,0,0}
+};
+static swig_lua_attribute swig_PlayerEquipment_cls_attributes[] = {
+    {0,0,0}
+};
+static swig_lua_method swig_PlayerEquipment_cls_methods[] = {
+    {0,0}
+};
+static swig_lua_const_info swig_PlayerEquipment_cls_constants[] = {
+    {0,0,0,0,0,0}
+};
+static swig_lua_class *swig_PlayerEquipment_bases[] = {0};
+static const char *swig_PlayerEquipment_base_names[] = {0};
+static swig_lua_class _wrap_class_PlayerEquipment = { "PlayerEquipment", &SWIGTYPE_p_PlayerEquipment,_wrap_new_PlayerEquipment, swig_delete_PlayerEquipment, swig_PlayerEquipment_methods, swig_PlayerEquipment_attributes, { "PlayerEquipment", swig_PlayerEquipment_cls_methods, swig_PlayerEquipment_cls_attributes, swig_PlayerEquipment_cls_constants }, swig_PlayerEquipment_bases, swig_PlayerEquipment_base_names };
+
+static int _wrap_new_Player(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *result = 0 ;
+  
+  SWIG_check_num_args("Player::Player",0,0)
+  result = (Player *)new Player();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Player,1); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetVariable(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum VariableType arg2 ;
+  int arg3 ;
+  
+  SWIG_check_num_args("Player::SetVariable",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetVariable",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::SetVariable",2,"enum VariableType");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::SetVariable",3,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetVariable",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (enum VariableType)(int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  (arg1)->SetVariable(arg2,arg3);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_AddVariable(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum VariableType arg2 ;
+  int arg3 ;
+  
+  SWIG_check_num_args("Player::AddVariable",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::AddVariable",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::AddVariable",2,"enum VariableType");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::AddVariable",3,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_AddVariable",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (enum VariableType)(int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  (arg1)->AddVariable(arg2,arg3);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SubtractVariable(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum VariableType arg2 ;
+  int arg3 ;
+  
+  SWIG_check_num_args("Player::SubtractVariable",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SubtractVariable",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::SubtractVariable",2,"enum VariableType");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::SubtractVariable",3,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SubtractVariable",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (enum VariableType)(int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  (arg1)->SubtractVariable(arg2,arg3);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CompareVariable(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum VariableType arg2 ;
+  int arg3 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::CompareVariable",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CompareVariable",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::CompareVariable",2,"enum VariableType");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::CompareVariable",3,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CompareVariable",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (enum VariableType)(int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  result = (bool)(arg1)->CompareVariable(arg2,arg3);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_UseItem_DrinkPotion_etc(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  int arg3 ;
+  
+  SWIG_check_num_args("Player::UseItem_DrinkPotion_etc",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::UseItem_DrinkPotion_etc",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::UseItem_DrinkPotion_etc",2,"int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::UseItem_DrinkPotion_etc",3,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_UseItem_DrinkPotion_etc",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  (arg1)->UseItem_DrinkPotion_etc(arg2,arg3);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_AddItem__SWIG_0(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *arg2 = (ItemGen *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::AddItem",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::AddItem",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::AddItem",2,"ItemGen *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_AddItem",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_ItemGen,0))){
+    SWIG_fail_ptr("Player_AddItem",2,SWIGTYPE_p_ItemGen);
+  }
+  
+  result = (bool)(arg1)->AddItem(arg2);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualAttribute(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  CHARACTER_ATTRIBUTE_TYPE arg2 ;
+  unsigned short Player::*arg3 ;
+  unsigned short Player::*arg4 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualAttribute",4,4)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualAttribute",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetActualAttribute",2,"CHARACTER_ATTRIBUTE_TYPE");
+  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Player::GetActualAttribute",3,"unsigned short Player::*");
+  if(!lua_isuserdata(L,4)) SWIG_fail_arg("Player::GetActualAttribute",4,"unsigned short Player::*");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualAttribute",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (CHARACTER_ATTRIBUTE_TYPE)(int)lua_tonumber(L, 2);
+  
+  if (!SWIG_IsOK(SWIG_ConvertMember(L,3,(void*)(&arg3),sizeof(unsigned short Player::*),SWIGTYPE_m_Player__unsigned_short)))
+  SWIG_fail_ptr("Player_GetActualAttribute",3,SWIGTYPE_m_Player__unsigned_short);
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertMember(L,4,(void*)(&arg4),sizeof(unsigned short Player::*),SWIGTYPE_m_Player__unsigned_short)))
+  SWIG_fail_ptr("Player_GetActualAttribute",4,SWIGTYPE_m_Player__unsigned_short);
+  
+  result = (int)(arg1)->GetActualAttribute(arg2,arg3,arg4);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseStrength(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseStrength",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseStrength",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseStrength",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetBaseStrength();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseIntelligence(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseIntelligence",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseIntelligence",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseIntelligence",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetBaseIntelligence();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseWillpower(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseWillpower",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseWillpower",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseWillpower",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetBaseWillpower();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseEndurance(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseEndurance",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseEndurance",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseEndurance",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetBaseEndurance();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseAccuracy(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseAccuracy",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseAccuracy",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseAccuracy",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetBaseAccuracy();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseSpeed(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseSpeed",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseSpeed",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseSpeed",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetBaseSpeed();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseLuck(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseLuck",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseLuck",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseLuck",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetBaseLuck();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseLevel(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseLevel",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseLevel",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseLevel",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetBaseLevel();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualLevel(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualLevel",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualLevel",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualLevel",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetActualLevel();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualMight(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualMight",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualMight",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualMight",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetActualMight();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualIntelligence(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualIntelligence",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualIntelligence",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualIntelligence",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetActualIntelligence();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualWillpower(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualWillpower",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualWillpower",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualWillpower",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetActualWillpower();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualEndurance(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualEndurance",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualEndurance",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualEndurance",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetActualEndurance();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualAccuracy(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualAccuracy",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualAccuracy",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualAccuracy",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetActualAccuracy();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualSpeed(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualSpeed",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualSpeed",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualSpeed",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetActualSpeed();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualLuck(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualLuck",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualLuck",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualLuck",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetActualLuck();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualAttack(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualAttack",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualAttack",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::GetActualAttack",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualAttack",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  result = (int)(arg1)->GetActualAttack(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetMeleeDamageMinimal(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetMeleeDamageMinimal",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMeleeDamageMinimal",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMeleeDamageMinimal",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetMeleeDamageMinimal();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetMeleeDamageMaximal(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetMeleeDamageMaximal",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMeleeDamageMaximal",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMeleeDamageMaximal",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetMeleeDamageMaximal();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CalculateMeleeDamageTo(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  bool arg3 ;
+  unsigned int arg4 ;
+  int result;
+  
+  SWIG_check_num_args("Player::CalculateMeleeDamageTo",4,4)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CalculateMeleeDamageTo",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::CalculateMeleeDamageTo",2,"bool");
+  if(!lua_isboolean(L,3)) SWIG_fail_arg("Player::CalculateMeleeDamageTo",3,"bool");
+  if(!lua_isnumber(L,4)) SWIG_fail_arg("Player::CalculateMeleeDamageTo",4,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CalculateMeleeDamageTo",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  arg3 = (lua_toboolean(L, 3)!=0);
+  SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative")
+  arg4 = (unsigned int)lua_tonumber(L, 4);
+  result = (int)(arg1)->CalculateMeleeDamageTo(arg2,arg3,arg4);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetRangedAttack(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetRangedAttack",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetRangedAttack",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetRangedAttack",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetRangedAttack();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetRangedDamageMin(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetRangedDamageMin",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetRangedDamageMin",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetRangedDamageMin",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetRangedDamageMin();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetRangedDamageMax(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetRangedDamageMax",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetRangedDamageMax",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetRangedDamageMax",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetRangedDamageMax();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CalculateRangedDamageTo(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::CalculateRangedDamageTo",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CalculateRangedDamageTo",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::CalculateRangedDamageTo",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CalculateRangedDamageTo",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  result = (int)(arg1)->CalculateRangedDamageTo(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetMeleeDamageString(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetMeleeDamageString",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMeleeDamageString",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMeleeDamageString",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char *)(arg1)->GetMeleeDamageString();
+  lua_pushstring(L,(const char *)result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetRangedDamageString(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetRangedDamageString",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetRangedDamageString",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetRangedDamageString",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char *)(arg1)->GetRangedDamageString();
+  lua_pushstring(L,(const char *)result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CanTrainToNextLevel(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::CanTrainToNextLevel",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CanTrainToNextLevel",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CanTrainToNextLevel",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->CanTrainToNextLevel();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetExperienceDisplayColor(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::GetExperienceDisplayColor",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetExperienceDisplayColor",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetExperienceDisplayColor",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (unsigned int)(arg1)->GetExperienceDisplayColor();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CalculateIncommingDamage(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  DAMAGE_TYPE arg2 ;
+  int arg3 ;
+  DAMAGE_TYPE *argp2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::CalculateIncommingDamage",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CalculateIncommingDamage",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::CalculateIncommingDamage",2,"DAMAGE_TYPE");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::CalculateIncommingDamage",3,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CalculateIncommingDamage",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_DAMAGE_TYPE,0))){
+    SWIG_fail_ptr("Player_CalculateIncommingDamage",2,SWIGTYPE_p_DAMAGE_TYPE);
+  }
+  arg2 = *argp2;
+  
+  arg3 = (int)lua_tonumber(L, 3);
+  result = (int)(arg1)->CalculateIncommingDamage(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetEquippedItemEquipType(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ITEM_EQUIP_TYPE arg2 ;
+  ITEM_EQUIP_TYPE *argp2 ;
+  ITEM_EQUIP_TYPE result;
+  
+  SWIG_check_num_args("Player::GetEquippedItemEquipType",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetEquippedItemEquipType",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::GetEquippedItemEquipType",2,"ITEM_EQUIP_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetEquippedItemEquipType",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_ITEM_EQUIP_TYPE,0))){
+    SWIG_fail_ptr("Player_GetEquippedItemEquipType",2,SWIGTYPE_p_ITEM_EQUIP_TYPE);
+  }
+  arg2 = *argp2;
+  
+  result = (arg1)->GetEquippedItemEquipType(arg2);
+  {
+    ITEM_EQUIP_TYPE * resultptr = new ITEM_EQUIP_TYPE((const ITEM_EQUIP_TYPE &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_ITEM_EQUIP_TYPE,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetEquippedItemSkillType(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ITEM_EQUIP_TYPE arg2 ;
+  ITEM_EQUIP_TYPE *argp2 ;
+  PLAYER_SKILL_TYPE result;
+  
+  SWIG_check_num_args("Player::GetEquippedItemSkillType",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetEquippedItemSkillType",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::GetEquippedItemSkillType",2,"ITEM_EQUIP_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetEquippedItemSkillType",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_ITEM_EQUIP_TYPE,0))){
+    SWIG_fail_ptr("Player_GetEquippedItemSkillType",2,SWIGTYPE_p_ITEM_EQUIP_TYPE);
+  }
+  arg2 = *argp2;
+  
+  result = (PLAYER_SKILL_TYPE)(arg1)->GetEquippedItemSkillType(arg2);
+  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsUnarmed(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsUnarmed",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsUnarmed",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsUnarmed",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsUnarmed();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_HasItemEquipped(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ITEM_EQUIP_TYPE arg2 ;
+  ITEM_EQUIP_TYPE *argp2 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::HasItemEquipped",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::HasItemEquipped",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::HasItemEquipped",2,"ITEM_EQUIP_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_HasItemEquipped",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_ITEM_EQUIP_TYPE,0))){
+    SWIG_fail_ptr("Player_HasItemEquipped",2,SWIGTYPE_p_ITEM_EQUIP_TYPE);
+  }
+  arg2 = *argp2;
+  
+  result = (bool)(arg1)->HasItemEquipped(arg2);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_HasEnchantedItemEquipped(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::HasEnchantedItemEquipped",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::HasEnchantedItemEquipped",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::HasEnchantedItemEquipped",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_HasEnchantedItemEquipped",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  result = (bool)(arg1)->HasEnchantedItemEquipped(arg2);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_WearsItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  ITEM_EQUIP_TYPE arg3 ;
+  ITEM_EQUIP_TYPE *argp3 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::WearsItem",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::WearsItem",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::WearsItem",2,"int");
+  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Player::WearsItem",3,"ITEM_EQUIP_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_WearsItem",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_ITEM_EQUIP_TYPE,0))){
+    SWIG_fail_ptr("Player_WearsItem",3,SWIGTYPE_p_ITEM_EQUIP_TYPE);
+  }
+  arg3 = *argp3;
+  
+  result = (bool)(arg1)->WearsItem(arg2,arg3);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_StealFromShop(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *arg2 = (ItemGen *) 0 ;
+  int arg3 ;
+  int arg4 ;
+  int arg5 ;
+  int *arg6 = (int *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::StealFromShop",6,6)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::StealFromShop",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::StealFromShop",2,"ItemGen *");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::StealFromShop",3,"int");
+  if(!lua_isnumber(L,4)) SWIG_fail_arg("Player::StealFromShop",4,"int");
+  if(!lua_isnumber(L,5)) SWIG_fail_arg("Player::StealFromShop",5,"int");
+  if(!SWIG_isptrtype(L,6)) SWIG_fail_arg("Player::StealFromShop",6,"int *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_StealFromShop",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_ItemGen,0))){
+    SWIG_fail_ptr("Player_StealFromShop",2,SWIGTYPE_p_ItemGen);
+  }
+  
+  arg3 = (int)lua_tonumber(L, 3);
+  arg4 = (int)lua_tonumber(L, 4);
+  arg5 = (int)lua_tonumber(L, 5);
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,6,(void**)&arg6,SWIGTYPE_p_int,0))){
+    SWIG_fail_ptr("Player_StealFromShop",6,SWIGTYPE_p_int);
+  }
+  
+  result = (int)(arg1)->StealFromShop(arg2,arg3,arg4,arg5,arg6);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_StealFromActor(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  int arg3 ;
+  int arg4 ;
+  int result;
+  
+  SWIG_check_num_args("Player::StealFromActor",4,4)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::StealFromActor",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::StealFromActor",2,"unsigned int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::StealFromActor",3,"int");
+  if(!lua_isnumber(L,4)) SWIG_fail_arg("Player::StealFromActor",4,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_StealFromActor",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  arg4 = (int)lua_tonumber(L, 4);
+  result = (int)(arg1)->StealFromActor(arg2,arg3,arg4);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_Heal(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::Heal",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::Heal",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::Heal",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_Heal",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  (arg1)->Heal(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_ReceiveDamage(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  DAMAGE_TYPE arg3 ;
+  DAMAGE_TYPE *argp3 ;
+  int result;
+  
+  SWIG_check_num_args("Player::ReceiveDamage",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::ReceiveDamage",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::ReceiveDamage",2,"int");
+  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Player::ReceiveDamage",3,"DAMAGE_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_ReceiveDamage",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_DAMAGE_TYPE,0))){
+    SWIG_fail_ptr("Player_ReceiveDamage",3,SWIGTYPE_p_DAMAGE_TYPE);
+  }
+  arg3 = *argp3;
+  
+  result = (int)(arg1)->ReceiveDamage(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_ReceiveSpecialAttackEffect(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  Actor *arg3 = (Actor *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::ReceiveSpecialAttackEffect",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::ReceiveSpecialAttackEffect",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::ReceiveSpecialAttackEffect",2,"int");
+  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Player::ReceiveSpecialAttackEffect",3,"Actor *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_ReceiveSpecialAttackEffect",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Actor,0))){
+    SWIG_fail_ptr("Player_ReceiveSpecialAttackEffect",3,SWIGTYPE_p_Actor);
+  }
+  
+  result = (int)(arg1)->ReceiveSpecialAttackEffect(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetSpellSchool(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::GetSpellSchool",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetSpellSchool",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetSpellSchool",2,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetSpellSchool",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  result = (unsigned int)(arg1)->GetSpellSchool(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetAttackRecoveryTime(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetAttackRecoveryTime",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetAttackRecoveryTime",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::GetAttackRecoveryTime",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetAttackRecoveryTime",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  result = (int)(arg1)->GetAttackRecoveryTime(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetMaxHealth(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetMaxHealth",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMaxHealth",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMaxHealth",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetMaxHealth();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetMaxMana(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetMaxMana",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMaxMana",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMaxMana",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetMaxMana();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseAC(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseAC",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseAC",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseAC",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetBaseAC();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualAC(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualAC",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualAC",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualAC",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetActualAC();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseAge(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::GetBaseAge",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseAge",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseAge",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (unsigned int)(arg1)->GetBaseAge();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualAge(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::GetActualAge",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualAge",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualAge",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (unsigned int)(arg1)->GetActualAge();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseResistance(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum CHARACTER_ATTRIBUTE_TYPE arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseResistance",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseResistance",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetBaseResistance",2,"enum CHARACTER_ATTRIBUTE_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseResistance",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (enum CHARACTER_ATTRIBUTE_TYPE)(int)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetBaseResistance(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualResistance(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum CHARACTER_ATTRIBUTE_TYPE arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualResistance",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualResistance",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetActualResistance",2,"enum CHARACTER_ATTRIBUTE_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualResistance",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (enum CHARACTER_ATTRIBUTE_TYPE)(int)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetActualResistance(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetRecoveryTime(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::SetRecoveryTime",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetRecoveryTime",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::SetRecoveryTime",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetRecoveryTime",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  (arg1)->SetRecoveryTime(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_RandomizeName(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  
+  SWIG_check_num_args("Player::RandomizeName",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::RandomizeName",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_RandomizeName",1,SWIGTYPE_p_Player);
+  }
+  
+  (arg1)->RandomizeName();
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetMajorConditionIdx(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::GetMajorConditionIdx",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMajorConditionIdx",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMajorConditionIdx",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (unsigned int)(arg1)->GetMajorConditionIdx();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetParameterBonus(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetParameterBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetParameterBonus",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetParameterBonus",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetParameterBonus",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetParameterBonus(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetSpecialItemBonus(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetSpecialItemBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetSpecialItemBonus",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetSpecialItemBonus",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetSpecialItemBonus",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetSpecialItemBonus(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetItemsBonus__SWIG_0(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum CHARACTER_ATTRIBUTE_TYPE arg2 ;
+  bool arg3 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetItemsBonus",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetItemsBonus",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetItemsBonus",2,"enum CHARACTER_ATTRIBUTE_TYPE");
+  if(!lua_isboolean(L,3)) SWIG_fail_arg("Player::GetItemsBonus",3,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetItemsBonus",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (enum CHARACTER_ATTRIBUTE_TYPE)(int)lua_tonumber(L, 2);
+  arg3 = (lua_toboolean(L, 3)!=0);
+  result = (int)(arg1)->GetItemsBonus(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetItemsBonus__SWIG_1(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum CHARACTER_ATTRIBUTE_TYPE arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetItemsBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetItemsBonus",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetItemsBonus",2,"enum CHARACTER_ATTRIBUTE_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetItemsBonus",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (enum CHARACTER_ATTRIBUTE_TYPE)(int)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetItemsBonus(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetItemsBonus(lua_State* L) {
+  int argc;
+  int argv[4]={
+    1,2,3,4
+  };
+  
+  argc = lua_gettop(L);
+  if (argc == 2) {
+    int _v;
+    {
+      void *ptr;
+      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Player, 0)) {
+        _v = 0;
+      } else {
+        _v = 1;
+      }
+    }
+    if (_v) {
+      {
+        _v = lua_isnumber(L,argv[1]);
+      }
+      if (_v) {
+        return _wrap_Player_GetItemsBonus__SWIG_1(L);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    {
+      void *ptr;
+      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Player, 0)) {
+        _v = 0;
+      } else {
+        _v = 1;
+      }
+    }
+    if (_v) {
+      {
+        _v = lua_isnumber(L,argv[1]);
+      }
+      if (_v) {
+        {
+          _v = lua_isboolean(L,argv[2]);
+        }
+        if (_v) {
+          return _wrap_Player_GetItemsBonus__SWIG_0(L);
+        }
+      }
+    }
+  }
+  
+  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Player_GetItemsBonus'\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    Player::GetItemsBonus(enum CHARACTER_ATTRIBUTE_TYPE,bool)\n"
+    "    Player::GetItemsBonus(enum CHARACTER_ATTRIBUTE_TYPE)\n");
+  lua_error(L);return 0;
+}
+
+
+static int _wrap_Player_GetMagicalBonus(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum CHARACTER_ATTRIBUTE_TYPE arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetMagicalBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMagicalBonus",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetMagicalBonus",2,"enum CHARACTER_ATTRIBUTE_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMagicalBonus",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (enum CHARACTER_ATTRIBUTE_TYPE)(int)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetMagicalBonus(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetActualSkillLevel(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PLAYER_SKILL_TYPE arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetActualSkillLevel",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetActualSkillLevel",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetActualSkillLevel",2,"PLAYER_SKILL_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetActualSkillLevel",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (PLAYER_SKILL_TYPE)(int)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetActualSkillLevel(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetSkillBonus(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum CHARACTER_ATTRIBUTE_TYPE arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetSkillBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetSkillBonus",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetSkillBonus",2,"enum CHARACTER_ATTRIBUTE_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetSkillBonus",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (enum CHARACTER_ATTRIBUTE_TYPE)(int)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetSkillBonus(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetRace(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  enum CHARACTER_RACE result;
+  
+  SWIG_check_num_args("Player::GetRace",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetRace",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetRace",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (enum CHARACTER_RACE)(arg1)->GetRace();
+  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetSexByVoice(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PLAYER_SEX result;
+  
+  SWIG_check_num_args("Player::GetSexByVoice",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetSexByVoice",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetSexByVoice",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (PLAYER_SEX)(arg1)->GetSexByVoice();
+  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetInitialStats(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  
+  SWIG_check_num_args("Player::SetInitialStats",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetInitialStats",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetInitialStats",1,SWIGTYPE_p_Player);
+  }
+  
+  (arg1)->SetInitialStats();
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetSexByVoice(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  
+  SWIG_check_num_args("Player::SetSexByVoice",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetSexByVoice",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetSexByVoice",1,SWIGTYPE_p_Player);
+  }
+  
+  (arg1)->SetSexByVoice();
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_Reset(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PLAYER_CLASS_TYPE arg2 ;
+  
+  SWIG_check_num_args("Player::Reset",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::Reset",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::Reset",2,"PLAYER_CLASS_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_Reset",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (PLAYER_CLASS_TYPE)(int)lua_tonumber(L, 2);
+  (arg1)->Reset(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetSkillIdxByOrder(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  PLAYER_SKILL_TYPE result;
+  
+  SWIG_check_num_args("Player::GetSkillIdxByOrder",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetSkillIdxByOrder",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetSkillIdxByOrder",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetSkillIdxByOrder",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  result = (PLAYER_SKILL_TYPE)(arg1)->GetSkillIdxByOrder(arg2);
+  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_DecreaseAttribute(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::DecreaseAttribute",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::DecreaseAttribute",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::DecreaseAttribute",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_DecreaseAttribute",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  (arg1)->DecreaseAttribute(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IncreaseAttribute(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::IncreaseAttribute",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IncreaseAttribute",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::IncreaseAttribute",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IncreaseAttribute",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  (arg1)->IncreaseAttribute(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_Zero(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  
+  SWIG_check_num_args("Player::Zero",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::Zero",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_Zero",1,SWIGTYPE_p_Player);
+  }
+  
+  (arg1)->Zero();
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetStatColor(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::GetStatColor",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetStatColor",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetStatColor",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetStatColor",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  result = (unsigned int)(arg1)->GetStatColor(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_DiscardConditionIfLastsLongerThan(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  unsigned __int64 arg3 ;
+  unsigned __int64 *argp3 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::DiscardConditionIfLastsLongerThan",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::DiscardConditionIfLastsLongerThan",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::DiscardConditionIfLastsLongerThan",2,"unsigned int");
+  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Player::DiscardConditionIfLastsLongerThan",3,"unsigned __int64");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_DiscardConditionIfLastsLongerThan",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_unsigned___int64,0))){
+    SWIG_fail_ptr("Player_DiscardConditionIfLastsLongerThan",3,SWIGTYPE_p_unsigned___int64);
+  }
+  arg3 = *argp3;
+  
+  result = (bool)(arg1)->DiscardConditionIfLastsLongerThan(arg2,arg3);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SelectPhrasesTransaction(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *arg2 = (ItemGen *) 0 ;
+  int arg3 ;
+  int arg4 ;
+  int arg5 ;
+  int result;
+  
+  SWIG_check_num_args("Player::SelectPhrasesTransaction",5,5)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SelectPhrasesTransaction",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::SelectPhrasesTransaction",2,"ItemGen *");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::SelectPhrasesTransaction",3,"int");
+  if(!lua_isnumber(L,4)) SWIG_fail_arg("Player::SelectPhrasesTransaction",4,"int");
+  if(!lua_isnumber(L,5)) SWIG_fail_arg("Player::SelectPhrasesTransaction",5,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SelectPhrasesTransaction",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_ItemGen,0))){
+    SWIG_fail_ptr("Player_SelectPhrasesTransaction",2,SWIGTYPE_p_ItemGen);
+  }
+  
+  arg3 = (int)lua_tonumber(L, 3);
+  arg4 = (int)lua_tonumber(L, 4);
+  arg5 = (int)lua_tonumber(L, 5);
+  result = (int)(arg1)->SelectPhrasesTransaction(arg2,arg3,arg4,arg5);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBodybuilding(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBodybuilding",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBodybuilding",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBodybuilding",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetBodybuilding();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetMeditation(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetMeditation",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMeditation",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMeditation",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetMeditation();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CanIdentify(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *arg2 = (ItemGen *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::CanIdentify",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CanIdentify",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::CanIdentify",2,"ItemGen *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CanIdentify",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_ItemGen,0))){
+    SWIG_fail_ptr("Player_CanIdentify",2,SWIGTYPE_p_ItemGen);
+  }
+  
+  result = (bool)(arg1)->CanIdentify(arg2);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CanRepair(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *arg2 = (ItemGen *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::CanRepair",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CanRepair",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::CanRepair",2,"ItemGen *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CanRepair",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_ItemGen,0))){
+    SWIG_fail_ptr("Player_CanRepair",2,SWIGTYPE_p_ItemGen);
+  }
+  
+  result = (bool)(arg1)->CanRepair(arg2);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetMerchant(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetMerchant",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMerchant",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMerchant",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetMerchant();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetPerception(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetPerception",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetPerception",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetPerception",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetPerception();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetDisarmTrap(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetDisarmTrap",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetDisarmTrap",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetDisarmTrap",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetDisarmTrap();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetLearningPercent(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::GetLearningPercent",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetLearningPercent",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetLearningPercent",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char)(arg1)->GetLearningPercent();
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CanFitItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  unsigned int arg3 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::CanFitItem",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CanFitItem",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::CanFitItem",2,"unsigned int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::CanFitItem",3,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CanFitItem",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative")
+  arg3 = (unsigned int)lua_tonumber(L, 3);
+  result = (bool)(arg1)->CanFitItem(arg2,arg3);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_FindFreeInventoryListSlot(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::FindFreeInventoryListSlot",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::FindFreeInventoryListSlot",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_FindFreeInventoryListSlot",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->FindFreeInventoryListSlot();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CreateItemInInventory(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  unsigned int arg3 ;
+  int result;
+  
+  SWIG_check_num_args("Player::CreateItemInInventory",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CreateItemInInventory",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::CreateItemInInventory",2,"unsigned int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::CreateItemInInventory",3,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CreateItemInInventory",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative")
+  arg3 = (unsigned int)lua_tonumber(L, 3);
+  result = (int)(arg1)->CreateItemInInventory(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_HasSkill(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::HasSkill",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::HasSkill",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::HasSkill",2,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_HasSkill",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  result = (int)(arg1)->HasSkill(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_WearItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  
+  SWIG_check_num_args("Player::WearItem",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::WearItem",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::WearItem",2,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_WearItem",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  (arg1)->WearItem(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_AddItem__SWIG_1(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  unsigned int arg3 ;
+  int result;
+  
+  SWIG_check_num_args("Player::AddItem",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::AddItem",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::AddItem",2,"int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::AddItem",3,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_AddItem",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative")
+  arg3 = (unsigned int)lua_tonumber(L, 3);
+  result = (int)(arg1)->AddItem(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_AddItem(lua_State* L) {
+  int argc;
+  int argv[4]={
+    1,2,3,4
+  };
+  
+  argc = lua_gettop(L);
+  if (argc == 2) {
+    int _v;
+    {
+      void *ptr;
+      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Player, 0)) {
+        _v = 0;
+      } else {
+        _v = 1;
+      }
+    }
+    if (_v) {
+      {
+        void *ptr;
+        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_ItemGen, 0)) {
+          _v = 0;
+        } else {
+          _v = 1;
+        }
+      }
+      if (_v) {
+        return _wrap_Player_AddItem__SWIG_0(L);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    {
+      void *ptr;
+      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Player, 0)) {
+        _v = 0;
+      } else {
+        _v = 1;
+      }
+    }
+    if (_v) {
+      {
+        _v = lua_isnumber(L,argv[1]);
+      }
+      if (_v) {
+        {
+          _v = lua_isnumber(L,argv[2]);
+        }
+        if (_v) {
+          return _wrap_Player_AddItem__SWIG_1(L);
+        }
+      }
+    }
+  }
+  
+  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Player_AddItem'\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    Player::AddItem(ItemGen *)\n"
+    "    Player::AddItem(int,unsigned int)\n");
+  lua_error(L);return 0;
+}
+
+
+static int _wrap_Player_AddItem2(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  ItemGen *arg3 = (ItemGen *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::AddItem2",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::AddItem2",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::AddItem2",2,"int");
+  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Player::AddItem2",3,"ItemGen *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_AddItem2",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_ItemGen,0))){
+    SWIG_fail_ptr("Player_AddItem2",3,SWIGTYPE_p_ItemGen);
+  }
+  
+  result = (int)(arg1)->AddItem2(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CreateItemInInventory2(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  ItemGen *arg3 = (ItemGen *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::CreateItemInInventory2",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CreateItemInInventory2",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::CreateItemInInventory2",2,"unsigned int");
+  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Player::CreateItemInInventory2",3,"ItemGen *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CreateItemInInventory2",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_ItemGen,0))){
+    SWIG_fail_ptr("Player_CreateItemInInventory2",3,SWIGTYPE_p_ItemGen);
+  }
+  
+  result = (int)(arg1)->CreateItemInInventory2(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_PutItemArInventoryIndex(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  int arg3 ;
+  int arg4 ;
+  
+  SWIG_check_num_args("Player::PutItemArInventoryIndex",4,4)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::PutItemArInventoryIndex",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::PutItemArInventoryIndex",2,"int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::PutItemArInventoryIndex",3,"int");
+  if(!lua_isnumber(L,4)) SWIG_fail_arg("Player::PutItemArInventoryIndex",4,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_PutItemArInventoryIndex",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  arg4 = (int)lua_tonumber(L, 4);
+  (arg1)->PutItemArInventoryIndex(arg2,arg3,arg4);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_RemoveItemAtInventoryIndex(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  
+  SWIG_check_num_args("Player::RemoveItemAtInventoryIndex",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::RemoveItemAtInventoryIndex",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::RemoveItemAtInventoryIndex",2,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_RemoveItemAtInventoryIndex",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  (arg1)->RemoveItemAtInventoryIndex(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CanAct(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::CanAct",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CanAct",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CanAct",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->CanAct();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CanSteal(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::CanSteal",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CanSteal",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CanSteal",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->CanSteal();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CanEquip_RaceAndAlignmentCheck(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::CanEquip_RaceAndAlignmentCheck",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CanEquip_RaceAndAlignmentCheck",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::CanEquip_RaceAndAlignmentCheck",2,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CanEquip_RaceAndAlignmentCheck",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  result = (bool)(arg1)->CanEquip_RaceAndAlignmentCheck(arg2);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetCondition(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  int arg3 ;
+  
+  SWIG_check_num_args("Player::SetCondition",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetCondition",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::SetCondition",2,"unsigned int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::SetCondition",3,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetCondition",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  (arg1)->SetCondition(arg2,arg3);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_ProfessionOrGuildFlagsCorrect(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  int arg3 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::ProfessionOrGuildFlagsCorrect",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::ProfessionOrGuildFlagsCorrect",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::ProfessionOrGuildFlagsCorrect",2,"unsigned int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::ProfessionOrGuildFlagsCorrect",3,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_ProfessionOrGuildFlagsCorrect",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  result = (bool)(arg1)->ProfessionOrGuildFlagsCorrect(arg2,arg3);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_PlaySound(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PlayerSpeech arg2 ;
+  int arg3 ;
+  
+  SWIG_check_num_args("Player::PlaySound",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::PlaySound",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::PlaySound",2,"PlayerSpeech");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::PlaySound",3,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_PlaySound",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (PlayerSpeech)(int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  (arg1)->PlaySound(arg2,arg3);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_PlayEmotion(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  CHARACTER_EXPRESSION_ID arg2 ;
+  int arg3 ;
+  
+  SWIG_check_num_args("Player::PlayEmotion",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::PlayEmotion",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::PlayEmotion",2,"CHARACTER_EXPRESSION_ID");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::PlayEmotion",3,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_PlayEmotion",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (CHARACTER_EXPRESSION_ID)(int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  (arg1)->PlayEmotion(arg2,arg3);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_ItemsEnchant(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::ItemsEnchant",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::ItemsEnchant",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::ItemsEnchant",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_ItemsEnchant",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  (arg1)->ItemsEnchant(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetItemIDAtInventoryIndex(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int *arg2 = (int *) 0 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::GetItemIDAtInventoryIndex",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetItemIDAtInventoryIndex",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::GetItemIDAtInventoryIndex",2,"int *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetItemIDAtInventoryIndex",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_int,0))){
+    SWIG_fail_ptr("Player_GetItemIDAtInventoryIndex",2,SWIGTYPE_p_int);
+  }
+  
+  result = (unsigned int)(arg1)->GetItemIDAtInventoryIndex(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsPlayerHealableByTemple(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsPlayerHealableByTemple",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsPlayerHealableByTemple",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsPlayerHealableByTemple",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsPlayerHealableByTemple();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseIdentifyPrice(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  float arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseIdentifyPrice",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseIdentifyPrice",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetBaseIdentifyPrice",2,"float");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseIdentifyPrice",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (float)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetBaseIdentifyPrice(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseRepairPrice(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  float arg3 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseRepairPrice",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseRepairPrice",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetBaseRepairPrice",2,"int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::GetBaseRepairPrice",3,"float");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseRepairPrice",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  arg3 = (float)lua_tonumber(L, 3);
+  result = (int)(arg1)->GetBaseRepairPrice(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseBuyingPrice(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  float arg3 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseBuyingPrice",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseBuyingPrice",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetBaseBuyingPrice",2,"int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::GetBaseBuyingPrice",3,"float");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseBuyingPrice",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  arg3 = (float)lua_tonumber(L, 3);
+  result = (int)(arg1)->GetBaseBuyingPrice(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBaseSellingPrice(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  float arg3 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBaseSellingPrice",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBaseSellingPrice",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetBaseSellingPrice",2,"int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::GetBaseSellingPrice",3,"float");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBaseSellingPrice",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  arg3 = (float)lua_tonumber(L, 3);
+  result = (int)(arg1)->GetBaseSellingPrice(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetPriceRepair(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  float arg3 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetPriceRepair",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetPriceRepair",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetPriceRepair",2,"int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::GetPriceRepair",3,"float");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetPriceRepair",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  arg3 = (float)lua_tonumber(L, 3);
+  result = (int)(arg1)->GetPriceRepair(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetPriceIdentification(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  float arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetPriceIdentification",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetPriceIdentification",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetPriceIdentification",2,"float");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetPriceIdentification",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (float)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetPriceIdentification(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBuyingPrice(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  float arg3 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetBuyingPrice",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBuyingPrice",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetBuyingPrice",2,"unsigned int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::GetBuyingPrice",3,"float");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBuyingPrice",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  arg3 = (float)lua_tonumber(L, 3);
+  result = (int)(arg1)->GetBuyingPrice(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetPriceSell(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  float arg3 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetPriceSell",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetPriceSell",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetPriceSell",2,"int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::GetPriceSell",3,"float");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetPriceSell",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  arg3 = (float)lua_tonumber(L, 3);
+  result = (int)(arg1)->GetPriceSell(arg2,arg3);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetTempleHealCostModifier(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  float arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetTempleHealCostModifier",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetTempleHealCostModifier",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetTempleHealCostModifier",2,"float");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetTempleHealCostModifier",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (float)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetTempleHealCostModifier(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetConditionDayOfWeek(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetConditionDayOfWeek",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetConditionDayOfWeek",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetConditionDayOfWeek",2,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetConditionDayOfWeek",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  result = (int)(arg1)->GetConditionDayOfWeek(arg2);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_NothingOrJustBlastersEquipped(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::NothingOrJustBlastersEquipped",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::NothingOrJustBlastersEquipped",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_NothingOrJustBlastersEquipped",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->NothingOrJustBlastersEquipped();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SalesProcess(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  int arg3 ;
+  int arg4 ;
+  
+  SWIG_check_num_args("Player::SalesProcess",4,4)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SalesProcess",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::SalesProcess",2,"unsigned int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::SalesProcess",3,"int");
+  if(!lua_isnumber(L,4)) SWIG_fail_arg("Player::SalesProcess",4,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SalesProcess",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  arg4 = (int)lua_tonumber(L, 4);
+  (arg1)->SalesProcess(arg2,arg3,arg4);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_Recover(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::Recover",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::Recover",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::Recover",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_Recover",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  result = (bool)(arg1)->Recover(arg2);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CanCastSpell(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::CanCastSpell",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CanCastSpell",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::CanCastSpell",2,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CanCastSpell",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  result = (bool)(arg1)->CanCastSpell(arg2);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_PlayAwardSound(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  
+  SWIG_check_num_args("Player::PlayAwardSound",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::PlayAwardSound",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_PlayAwardSound",1,SWIGTYPE_p_Player);
+  }
+  
+  (arg1)->PlayAwardSound();
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_EquipBody(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ITEM_EQUIP_TYPE arg2 ;
+  ITEM_EQUIP_TYPE *argp2 ;
+  
+  SWIG_check_num_args("Player::EquipBody",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::EquipBody",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::EquipBody",2,"ITEM_EQUIP_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_EquipBody",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_ITEM_EQUIP_TYPE,0))){
+    SWIG_fail_ptr("Player_EquipBody",2,SWIGTYPE_p_ITEM_EQUIP_TYPE);
+  }
+  arg2 = *argp2;
+  
+  (arg1)->EquipBody(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_HasUnderwaterSuitEquipped(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::HasUnderwaterSuitEquipped",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::HasUnderwaterSuitEquipped",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_HasUnderwaterSuitEquipped",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->HasUnderwaterSuitEquipped();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_HasItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  bool arg3 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::HasItem",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::HasItem",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::HasItem",2,"unsigned int");
+  if(!lua_isboolean(L,3)) SWIG_fail_arg("Player::HasItem",3,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_HasItem",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  arg3 = (lua_toboolean(L, 3)!=0);
+  result = (bool)(arg1)->HasItem(arg2,arg3);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_OnInventoryLeftClick(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  
+  SWIG_check_num_args("Player::OnInventoryLeftClick",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::OnInventoryLeftClick",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_OnInventoryLeftClick",1,SWIGTYPE_p_Player);
+  }
+  
+  (arg1)->OnInventoryLeftClick();
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetMultiplierForSkillLevel(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  int arg3 ;
+  int arg4 ;
+  int arg5 ;
+  int arg6 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::GetMultiplierForSkillLevel",6,6)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMultiplierForSkillLevel",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetMultiplierForSkillLevel",2,"unsigned int");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::GetMultiplierForSkillLevel",3,"int");
+  if(!lua_isnumber(L,4)) SWIG_fail_arg("Player::GetMultiplierForSkillLevel",4,"int");
+  if(!lua_isnumber(L,5)) SWIG_fail_arg("Player::GetMultiplierForSkillLevel",5,"int");
+  if(!lua_isnumber(L,6)) SWIG_fail_arg("Player::GetMultiplierForSkillLevel",6,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMultiplierForSkillLevel",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  arg3 = (int)lua_tonumber(L, 3);
+  arg4 = (int)lua_tonumber(L, 4);
+  arg5 = (int)lua_tonumber(L, 5);
+  arg6 = (int)lua_tonumber(L, 6);
+  result = (unsigned int)(arg1)->GetMultiplierForSkillLevel(arg2,arg3,arg4,arg5,arg6);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_CalculateMeleeDmgToEnemyWithWeapon(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *arg2 = (ItemGen *) 0 ;
+  unsigned int arg3 ;
+  bool arg4 ;
+  int result;
+  
+  SWIG_check_num_args("Player::CalculateMeleeDmgToEnemyWithWeapon",4,4)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::CalculateMeleeDmgToEnemyWithWeapon",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::CalculateMeleeDmgToEnemyWithWeapon",2,"ItemGen *");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::CalculateMeleeDmgToEnemyWithWeapon",3,"unsigned int");
+  if(!lua_isboolean(L,4)) SWIG_fail_arg("Player::CalculateMeleeDmgToEnemyWithWeapon",4,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_CalculateMeleeDmgToEnemyWithWeapon",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_ItemGen,0))){
+    SWIG_fail_ptr("Player_CalculateMeleeDmgToEnemyWithWeapon",2,SWIGTYPE_p_ItemGen);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative")
+  arg3 = (unsigned int)lua_tonumber(L, 3);
+  arg4 = (lua_toboolean(L, 4)!=0);
+  result = (int)(arg1)->CalculateMeleeDmgToEnemyWithWeapon(arg2,arg3,arg4);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_WearsItemAnyWhere(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::WearsItemAnyWhere",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::WearsItemAnyWhere",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::WearsItemAnyWhere",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_WearsItemAnyWhere",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  result = (bool)(arg1)->WearsItemAnyWhere(arg2);
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetArmorRecoveryMultiplierFromSkillLevel(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned char arg2 ;
+  float arg3 ;
+  float arg4 ;
+  float arg5 ;
+  float arg6 ;
+  float result;
+  
+  SWIG_check_num_args("Player::GetArmorRecoveryMultiplierFromSkillLevel",6,6)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetArmorRecoveryMultiplierFromSkillLevel",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetArmorRecoveryMultiplierFromSkillLevel",2,"unsigned char");
+  if(!lua_isnumber(L,3)) SWIG_fail_arg("Player::GetArmorRecoveryMultiplierFromSkillLevel",3,"float");
+  if(!lua_isnumber(L,4)) SWIG_fail_arg("Player::GetArmorRecoveryMultiplierFromSkillLevel",4,"float");
+  if(!lua_isnumber(L,5)) SWIG_fail_arg("Player::GetArmorRecoveryMultiplierFromSkillLevel",5,"float");
+  if(!lua_isnumber(L,6)) SWIG_fail_arg("Player::GetArmorRecoveryMultiplierFromSkillLevel",6,"float");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetArmorRecoveryMultiplierFromSkillLevel",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned char)lua_tonumber(L, 2);
+  arg3 = (float)lua_tonumber(L, 3);
+  arg4 = (float)lua_tonumber(L, 4);
+  arg5 = (float)lua_tonumber(L, 5);
+  arg6 = (float)lua_tonumber(L, 6);
+  result = (float)(arg1)->GetArmorRecoveryMultiplierFromSkillLevel(arg2,arg3,arg4,arg5,arg6);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetSkillByEvent(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 Player::*arg2 ;
+  unsigned __int16 arg3 ;
+  unsigned __int16 *argp3 ;
+  
+  SWIG_check_num_args("Player::SetSkillByEvent",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetSkillByEvent",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::SetSkillByEvent",2,"unsigned __int16 Player::*");
+  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Player::SetSkillByEvent",3,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetSkillByEvent",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertMember(L,2,(void*)(&arg2),sizeof(unsigned __int16 Player::*),SWIGTYPE_m_Player__unsigned___int16)))
+  SWIG_fail_ptr("Player_SetSkillByEvent",2,SWIGTYPE_m_Player__unsigned___int16);
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_SetSkillByEvent",3,SWIGTYPE_p_unsigned___int16);
+  }
+  arg3 = *argp3;
+  
+  (arg1)->SetSkillByEvent(arg2,arg3);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_AddSkillByEvent(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 Player::*arg2 ;
+  unsigned __int16 arg3 ;
+  unsigned __int16 *argp3 ;
+  
+  SWIG_check_num_args("Player::AddSkillByEvent",3,3)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::AddSkillByEvent",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::AddSkillByEvent",2,"unsigned __int16 Player::*");
+  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Player::AddSkillByEvent",3,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_AddSkillByEvent",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertMember(L,2,(void*)(&arg2),sizeof(unsigned __int16 Player::*),SWIGTYPE_m_Player__unsigned___int16)))
+  SWIG_fail_ptr("Player_AddSkillByEvent",2,SWIGTYPE_m_Player__unsigned___int16);
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_AddSkillByEvent",3,SWIGTYPE_p_unsigned___int16);
+  }
+  arg3 = *argp3;
+  
+  (arg1)->AddSkillByEvent(arg2,arg3);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_PlayAwardSound_Anim(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  
+  SWIG_check_num_args("Player::PlayAwardSound_Anim",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::PlayAwardSound_Anim",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_PlayAwardSound_Anim",1,SWIGTYPE_p_Player);
+  }
+  
+  (arg1)->PlayAwardSound_Anim();
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_PlayAwardSound_Anim_Face(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PlayerSpeech arg2 ;
+  
+  SWIG_check_num_args("Player::PlayAwardSound_Anim_Face",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::PlayAwardSound_Anim_Face",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::PlayAwardSound_Anim_Face",2,"PlayerSpeech");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_PlayAwardSound_Anim_Face",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (PlayerSpeech)(int)lua_tonumber(L, 2);
+  (arg1)->PlayAwardSound_Anim_Face(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_PlayAwardSound_Anim97(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  
+  SWIG_check_num_args("Player::PlayAwardSound_Anim97",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::PlayAwardSound_Anim97",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_PlayAwardSound_Anim97",1,SWIGTYPE_p_Player);
+  }
+  
+  (arg1)->PlayAwardSound_Anim97();
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_PlayAwardSound_Anim97_Face(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PlayerSpeech arg2 ;
+  
+  SWIG_check_num_args("Player::PlayAwardSound_Anim97_Face",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::PlayAwardSound_Anim97_Face",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::PlayAwardSound_Anim97_Face",2,"PlayerSpeech");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_PlayAwardSound_Anim97_Face",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (PlayerSpeech)(int)lua_tonumber(L, 2);
+  (arg1)->PlayAwardSound_Anim97_Face(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_PlayAwardSound_Anim98(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  
+  SWIG_check_num_args("Player::PlayAwardSound_Anim98",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::PlayAwardSound_Anim98",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_PlayAwardSound_Anim98",1,SWIGTYPE_p_Player);
+  }
+  
+  (arg1)->PlayAwardSound_Anim98();
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_PlayAwardSound_Anim98_Face(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PlayerSpeech arg2 ;
+  
+  SWIG_check_num_args("Player::PlayAwardSound_Anim98_Face",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::PlayAwardSound_Anim98_Face",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::PlayAwardSound_Anim98_Face",2,"PlayerSpeech");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_PlayAwardSound_Anim98_Face",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (PlayerSpeech)(int)lua_tonumber(L, 2);
+  (arg1)->PlayAwardSound_Anim98_Face(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsWeak(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsWeak",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsWeak",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsWeak",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsWeak();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsDead(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsDead",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsDead",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsDead",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsDead();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsEradicated(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsEradicated",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsEradicated",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsEradicated",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsEradicated();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsZombie(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsZombie",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsZombie",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsZombie",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsZombie();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsCursed(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsCursed",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsCursed",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsCursed",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsCursed();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsPertified(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsPertified",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsPertified",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsPertified",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsPertified();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsUnconcious(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsUnconcious",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsUnconcious",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsUnconcious",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsUnconcious();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsAsleep(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsAsleep",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsAsleep",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsAsleep",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsAsleep();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsParalyzed(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsParalyzed",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsParalyzed",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsParalyzed",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsParalyzed();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsDrunk(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsDrunk",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsDrunk",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsDrunk",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsDrunk();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetCursed(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetCursed",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetCursed",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetCursed",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetCursed",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetCursed(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetWeak(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetWeak",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetWeak",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetWeak",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetWeak",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetWeak(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetAsleep(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetAsleep",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetAsleep",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetAsleep",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetAsleep",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetAsleep(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetAfraid(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetAfraid",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetAfraid",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetAfraid",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetAfraid",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetAfraid(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetDrunk(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetDrunk",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetDrunk",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetDrunk",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetDrunk",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetDrunk(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetInsane(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetInsane",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetInsane",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetInsane",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetInsane",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetInsane(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetPoison1(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetPoison1",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetPoison1",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetPoison1",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetPoison1",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetPoison1(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetDisease1(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetDisease1",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetDisease1",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetDisease1",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetDisease1",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetDisease1(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetPoison2(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetPoison2",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetPoison2",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetPoison2",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetPoison2",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetPoison2(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetDisease2(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetDisease2",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetDisease2",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetDisease2",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetDisease2",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetDisease2(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetPoison3(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetPoison3",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetPoison3",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetPoison3",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetPoison3",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetPoison3(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetDisease3(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetDisease3",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetDisease3",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetDisease3",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetDisease3",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetDisease3(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetParalyzed(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetParalyzed",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetParalyzed",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetParalyzed",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetParalyzed",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetParalyzed(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetUnconcious(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetUnconcious",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetUnconcious",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetUnconcious",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetUnconcious",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetUnconcious(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetDead(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetDead",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetDead",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetDead",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetDead",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetDead(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetPertified(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetPertified",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetPertified",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetPertified",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetPertified",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetPertified(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetEradicated(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetEradicated",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetEradicated",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetEradicated",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetEradicated",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetEradicated(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetZombie(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool arg2 ;
+  
+  SWIG_check_num_args("Player::SetZombie",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetZombie",1,"Player *");
+  if(!lua_isboolean(L,2)) SWIG_fail_arg("Player::SetZombie",2,"bool");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetZombie",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_toboolean(L, 2)!=0);
+  (arg1)->SetZombie(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetCondWeakWithBlockCheck(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::SetCondWeakWithBlockCheck",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetCondWeakWithBlockCheck",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::SetCondWeakWithBlockCheck",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetCondWeakWithBlockCheck",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  (arg1)->SetCondWeakWithBlockCheck(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetCondInsaneWithBlockCheck(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::SetCondInsaneWithBlockCheck",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetCondInsaneWithBlockCheck",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::SetCondInsaneWithBlockCheck",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetCondInsaneWithBlockCheck",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  (arg1)->SetCondInsaneWithBlockCheck(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetCondDeadWithBlockCheck(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::SetCondDeadWithBlockCheck",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetCondDeadWithBlockCheck",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::SetCondDeadWithBlockCheck",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetCondDeadWithBlockCheck",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  (arg1)->SetCondDeadWithBlockCheck(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_SetCondUnconsciousWithBlockCheck(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::SetCondUnconsciousWithBlockCheck",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::SetCondUnconsciousWithBlockCheck",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::SetCondUnconsciousWithBlockCheck",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_SetCondUnconsciousWithBlockCheck",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  (arg1)->SetCondUnconsciousWithBlockCheck(arg2);
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsRaceHuman(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsRaceHuman",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsRaceHuman",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsRaceHuman",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsRaceHuman();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsRaceDwarf(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsRaceDwarf",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsRaceDwarf",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsRaceDwarf",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsRaceDwarf();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsRaceElf(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsRaceElf",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsRaceElf",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsRaceElf",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsRaceElf();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsRaceGoblin(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsRaceGoblin",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsRaceGoblin",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsRaceGoblin",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsRaceGoblin();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsMale(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsMale",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsMale",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsMale",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsMale();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_IsFemale(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  bool result;
+  
+  SWIG_check_num_args("Player::IsFemale",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::IsFemale",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_IsFemale",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (bool)(arg1)->IsFemale();
+  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetMainHandItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetMainHandItem",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetMainHandItem",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetMainHandItem",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (ItemGen *)(arg1)->GetMainHandItem();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetOffHandItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetOffHandItem",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetOffHandItem",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetOffHandItem",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (ItemGen *)(arg1)->GetOffHandItem();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBowItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetBowItem",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBowItem",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBowItem",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (ItemGen *)(arg1)->GetBowItem();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetArmorItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetArmorItem",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetArmorItem",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetArmorItem",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (ItemGen *)(arg1)->GetArmorItem();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetHelmItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetHelmItem",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetHelmItem",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetHelmItem",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (ItemGen *)(arg1)->GetHelmItem();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBeltItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetBeltItem",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBeltItem",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBeltItem",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (ItemGen *)(arg1)->GetBeltItem();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetCloakItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetCloakItem",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetCloakItem",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetCloakItem",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (ItemGen *)(arg1)->GetCloakItem();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetGloveItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetGloveItem",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetGloveItem",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetGloveItem",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (ItemGen *)(arg1)->GetGloveItem();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetBootItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetBootItem",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetBootItem",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetBootItem",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (ItemGen *)(arg1)->GetBootItem();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetAmuletItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetAmuletItem",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetAmuletItem",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetAmuletItem",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (ItemGen *)(arg1)->GetAmuletItem();
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetNthRingItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetNthRingItem",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetNthRingItem",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetNthRingItem",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetNthRingItem",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  result = (ItemGen *)(arg1)->GetNthRingItem(arg2);
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetNthEquippedIndexItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetNthEquippedIndexItem",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetNthEquippedIndexItem",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::GetNthEquippedIndexItem",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetNthEquippedIndexItem",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  result = (ItemGen *)(arg1)->GetNthEquippedIndexItem(arg2);
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetItem(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int PlayerEquipment::*arg2 ;
+  ItemGen *result = 0 ;
+  
+  SWIG_check_num_args("Player::GetItem",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetItem",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::GetItem",2,"unsigned int PlayerEquipment::*");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetItem",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertMember(L,2,(void*)(&arg2),sizeof(unsigned int PlayerEquipment::*),SWIGTYPE_m_PlayerEquipment__unsigned_int)))
+  SWIG_fail_ptr("Player_GetItem",2,SWIGTYPE_m_PlayerEquipment__unsigned_int);
+  
+  result = (ItemGen *)(arg1)->GetItem(arg2);
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ItemGen,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_GetPlayerIndex(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::GetPlayerIndex",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::GetPlayerIndex",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_GetPlayerIndex",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int)(arg1)->GetPlayerIndex();
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pConditions_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  std::array< __int64,20 > arg2 ;
+  std::array< __int64,20 > *argp2 ;
+  
+  SWIG_check_num_args("Player::pConditions",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pConditions",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::pConditions",2,"std::array< __int64,20 >");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pConditions_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_std__arrayT___int64_20_t,0))){
+    SWIG_fail_ptr("Player_pConditions_set",2,SWIGTYPE_p_std__arrayT___int64_20_t);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->pConditions = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pConditions_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  std::array< __int64,20 > result;
+  
+  SWIG_check_num_args("Player::pConditions",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pConditions",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pConditions_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->pConditions);
+  {
+    std::array< __int64,20 > * resultptr = new std::array< __int64,20 >((const std::array< __int64,20 > &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__arrayT___int64_20_t,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uExperience_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int64 arg2 ;
+  unsigned __int64 *argp2 ;
+  
+  SWIG_check_num_args("Player::uExperience",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uExperience",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uExperience",2,"unsigned __int64");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uExperience_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int64,0))){
+    SWIG_fail_ptr("Player_uExperience_set",2,SWIGTYPE_p_unsigned___int64);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uExperience = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uExperience_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int64 result;
+  
+  SWIG_check_num_args("Player::uExperience",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uExperience",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uExperience_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uExperience);
+  {
+    unsigned __int64 * resultptr = new unsigned __int64((const unsigned __int64 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int64,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pName_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char *arg2 ;
+  
+  SWIG_check_num_args("Player::pName",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pName",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::pName",2,"char [16]");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pName_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (char *)lua_tostring(L, 2);
+  {
+    if(arg2) {
+      strncpy((char*)arg1->pName, (const char *)arg2, 16-1);
+      arg1->pName[16-1] = 0;
+    } else {
+      arg1->pName[0] = 0;
+    }
+  }
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pName_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char *result = 0 ;
+  
+  SWIG_check_num_args("Player::pName",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pName",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pName_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char *)(char *) ((arg1)->pName);
+  lua_pushstring(L,(const char *)result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uSex_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PLAYER_SEX arg2 ;
+  
+  SWIG_check_num_args("Player::uSex",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uSex",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::uSex",2,"PLAYER_SEX");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uSex_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (PLAYER_SEX)(int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->uSex = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uSex_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PLAYER_SEX result;
+  
+  SWIG_check_num_args("Player::uSex",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uSex",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uSex_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (PLAYER_SEX) ((arg1)->uSex);
+  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_classType_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PLAYER_CLASS_TYPE arg2 ;
+  
+  SWIG_check_num_args("Player::classType",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::classType",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::classType",2,"PLAYER_CLASS_TYPE");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_classType_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (PLAYER_CLASS_TYPE)(int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->classType = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_classType_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PLAYER_CLASS_TYPE result;
+  
+  SWIG_check_num_args("Player::classType",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::classType",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_classType_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (PLAYER_CLASS_TYPE) ((arg1)->classType);
+  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uCurrentFace_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int8 arg2 ;
+  unsigned __int8 *argp2 ;
+  
+  SWIG_check_num_args("Player::uCurrentFace",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uCurrentFace",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uCurrentFace",2,"unsigned __int8");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uCurrentFace_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int8,0))){
+    SWIG_fail_ptr("Player_uCurrentFace_set",2,SWIGTYPE_p_unsigned___int8);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uCurrentFace = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uCurrentFace_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int8 result;
+  
+  SWIG_check_num_args("Player::uCurrentFace",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uCurrentFace",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uCurrentFace_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uCurrentFace);
+  {
+    unsigned __int8 * resultptr = new unsigned __int8((const unsigned __int8 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int8,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_BB_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::field_BB",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_BB",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field_BB",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_BB_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->field_BB = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_BB_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::field_BB",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_BB",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_BB_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->field_BB);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uMight_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uMight",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uMight",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uMight",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uMight_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uMight_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uMight = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uMight_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uMight",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uMight",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uMight_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uMight);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uMightBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uMightBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uMightBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uMightBonus",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uMightBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uMightBonus_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uMightBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uMightBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uMightBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uMightBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uMightBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uMightBonus);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uIntelligence_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uIntelligence",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uIntelligence",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uIntelligence",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uIntelligence_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uIntelligence_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uIntelligence = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uIntelligence_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uIntelligence",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uIntelligence",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uIntelligence_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uIntelligence);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uIntelligenceBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uIntelligenceBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uIntelligenceBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uIntelligenceBonus",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uIntelligenceBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uIntelligenceBonus_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uIntelligenceBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uIntelligenceBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uIntelligenceBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uIntelligenceBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uIntelligenceBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uIntelligenceBonus);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uWillpower_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uWillpower",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uWillpower",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uWillpower",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uWillpower_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uWillpower_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uWillpower = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uWillpower_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uWillpower",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uWillpower",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uWillpower_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uWillpower);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uWillpowerBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uWillpowerBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uWillpowerBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uWillpowerBonus",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uWillpowerBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uWillpowerBonus_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uWillpowerBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uWillpowerBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uWillpowerBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uWillpowerBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uWillpowerBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uWillpowerBonus);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uEndurance_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uEndurance",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uEndurance",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uEndurance",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uEndurance_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uEndurance_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uEndurance = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uEndurance_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uEndurance",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uEndurance",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uEndurance_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uEndurance);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uEnduranceBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uEnduranceBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uEnduranceBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uEnduranceBonus",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uEnduranceBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uEnduranceBonus_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uEnduranceBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uEnduranceBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uEnduranceBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uEnduranceBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uEnduranceBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uEnduranceBonus);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uSpeed_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uSpeed",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uSpeed",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uSpeed",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uSpeed_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uSpeed_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uSpeed = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uSpeed_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uSpeed",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uSpeed",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uSpeed_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uSpeed);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uSpeedBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uSpeedBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uSpeedBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uSpeedBonus",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uSpeedBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uSpeedBonus_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uSpeedBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uSpeedBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uSpeedBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uSpeedBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uSpeedBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uSpeedBonus);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uAccuracy_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uAccuracy",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uAccuracy",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uAccuracy",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uAccuracy_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uAccuracy_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uAccuracy = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uAccuracy_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uAccuracy",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uAccuracy",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uAccuracy_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uAccuracy);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uAccuracyBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uAccuracyBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uAccuracyBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uAccuracyBonus",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uAccuracyBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uAccuracyBonus_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uAccuracyBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uAccuracyBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uAccuracyBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uAccuracyBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uAccuracyBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uAccuracyBonus);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uLuck_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uLuck",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uLuck",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uLuck",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uLuck_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uLuck_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uLuck = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uLuck_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uLuck",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uLuck",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uLuck_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uLuck);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uLuckBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uLuckBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uLuckBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uLuckBonus",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uLuckBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uLuckBonus_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uLuckBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uLuckBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uLuckBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uLuckBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uLuckBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uLuckBonus);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sACModifier_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sACModifier",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sACModifier",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sACModifier",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sACModifier_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sACModifier_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sACModifier = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sACModifier_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sACModifier",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sACModifier",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sACModifier_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sACModifier);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uLevel_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uLevel",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uLevel",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uLevel",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uLevel_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uLevel_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uLevel = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uLevel_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uLevel",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uLevel",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uLevel_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uLevel);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sLevelModifier_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sLevelModifier",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sLevelModifier",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sLevelModifier",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sLevelModifier_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sLevelModifier_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sLevelModifier = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sLevelModifier_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sLevelModifier",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sLevelModifier",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sLevelModifier_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sLevelModifier);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sAgeModifier_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sAgeModifier",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sAgeModifier",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sAgeModifier",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sAgeModifier_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sAgeModifier_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sAgeModifier = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sAgeModifier_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sAgeModifier",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sAgeModifier",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sAgeModifier_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sAgeModifier);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_E0_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_E0",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_E0",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_E0",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_E0_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_E0 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_E0_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_E0",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_E0",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_E0_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_E0);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_E4_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_E4",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_E4",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_E4",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_E4_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_E4 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_E4_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_E4",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_E4",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_E4_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_E4);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_E8_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_E8",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_E8",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_E8",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_E8_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_E8 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_E8_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_E8",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_E8",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_E8_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_E8);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_EC_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_EC",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_EC",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_EC",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_EC_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_EC = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_EC_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_EC",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_EC",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_EC_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_EC);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_F0_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_F0",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_F0",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_F0",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_F0_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_F0 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_F0_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_F0",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_F0",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_F0_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_F0);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_F4_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_F4",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_F4",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_F4",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_F4_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_F4 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_F4_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_F4",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_F4",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_F4_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_F4);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_F8_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_F8",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_F8",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_F8",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_F8_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_F8 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_F8_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_F8",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_F8",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_F8_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_F8);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_FC_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_FC",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_FC",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_FC",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_FC_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_FC = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_FC_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_FC",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_FC",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_FC_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_FC);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_100_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_100",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_100",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_100",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_100_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_100 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_100_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_100",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_100",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_100_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_100);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_104_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_104",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_104",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_104",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_104_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_104 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_104_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_104",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_104",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_104_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_104);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__achieved_awards_bits_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned char *arg2 ;
+  
+  SWIG_check_num_args("Player::_achieved_awards_bits",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_achieved_awards_bits",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::_achieved_awards_bits",2,"unsigned char [64]");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__achieved_awards_bits_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_unsigned_char,0))){
+    SWIG_fail_ptr("Player__achieved_awards_bits_set",2,SWIGTYPE_p_unsigned_char);
+  }
+  
+  {
+    size_t ii;
+    unsigned char *b = (unsigned char *) arg1->_achieved_awards_bits;
+    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((unsigned char *) arg2 + ii);
+  }
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__achieved_awards_bits_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned char *result = 0 ;
+  
+  SWIG_check_num_args("Player::_achieved_awards_bits",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_achieved_awards_bits",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__achieved_awards_bits_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (unsigned char *)(unsigned char *) ((arg1)->_achieved_awards_bits);
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_unsigned_char,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_spellbook_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PlayerSpells *arg2 = (PlayerSpells *) 0 ;
+  
+  SWIG_check_num_args("Player::spellbook",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::spellbook",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::spellbook",2,"PlayerSpells *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_spellbook_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_PlayerSpells,0))){
+    SWIG_fail_ptr("Player_spellbook_set",2,SWIGTYPE_p_PlayerSpells);
+  }
+  
+  if (arg1) (arg1)->spellbook = *arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_spellbook_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PlayerSpells *result = 0 ;
+  
+  SWIG_check_num_args("Player::spellbook",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::spellbook",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_spellbook_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (PlayerSpells *)& ((arg1)->spellbook);
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_PlayerSpells,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field__1F5_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char *arg2 ;
+  
+  SWIG_check_num_args("Player::field__1F5",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field__1F5",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field__1F5",2,"char [2]");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field__1F5_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (char *)lua_tostring(L, 2);
+  {
+    if(arg2) {
+      strncpy((char*)arg1->field__1F5, (const char *)arg2, 2-1);
+      arg1->field__1F5[2-1] = 0;
+    } else {
+      arg1->field__1F5[0] = 0;
+    }
+  }
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field__1F5_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char *result = 0 ;
+  
+  SWIG_check_num_args("Player::field__1F5",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field__1F5",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field__1F5_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char *)(char *) ((arg1)->field__1F5);
+  lua_pushstring(L,(const char *)result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_luck_used_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::pure_luck_used",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_luck_used",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::pure_luck_used",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_luck_used_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->pure_luck_used = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_luck_used_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::pure_luck_used",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_luck_used",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_luck_used_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->pure_luck_used);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_speed_used_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::pure_speed_used",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_speed_used",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::pure_speed_used",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_speed_used_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->pure_speed_used = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_speed_used_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::pure_speed_used",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_speed_used",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_speed_used_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->pure_speed_used);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_intellect_used_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::pure_intellect_used",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_intellect_used",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::pure_intellect_used",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_intellect_used_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->pure_intellect_used = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_intellect_used_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::pure_intellect_used",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_intellect_used",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_intellect_used_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->pure_intellect_used);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_endurance_used_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::pure_endurance_used",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_endurance_used",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::pure_endurance_used",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_endurance_used_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->pure_endurance_used = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_endurance_used_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::pure_endurance_used",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_endurance_used",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_endurance_used_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->pure_endurance_used);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_willpower_used_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::pure_willpower_used",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_willpower_used",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::pure_willpower_used",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_willpower_used_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->pure_willpower_used = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_willpower_used_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::pure_willpower_used",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_willpower_used",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_willpower_used_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->pure_willpower_used);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_accuracy_used_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::pure_accuracy_used",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_accuracy_used",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::pure_accuracy_used",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_accuracy_used_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->pure_accuracy_used = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_accuracy_used_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::pure_accuracy_used",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_accuracy_used",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_accuracy_used_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->pure_accuracy_used);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_might_used_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::pure_might_used",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_might_used",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::pure_might_used",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_might_used_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->pure_might_used = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pure_might_used_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::pure_might_used",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pure_might_used",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pure_might_used_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->pure_might_used);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pInventoryMatrix_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  std::array< int,126 > arg2 ;
+  std::array< int,126 > *argp2 ;
+  
+  SWIG_check_num_args("Player::pInventoryMatrix",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pInventoryMatrix",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::pInventoryMatrix",2,"std::array< int,126 >");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pInventoryMatrix_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_std__arrayT_int_126_t,0))){
+    SWIG_fail_ptr("Player_pInventoryMatrix_set",2,SWIGTYPE_p_std__arrayT_int_126_t);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->pInventoryMatrix = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pInventoryMatrix_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  std::array< int,126 > result;
+  
+  SWIG_check_num_args("Player::pInventoryMatrix",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pInventoryMatrix",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pInventoryMatrix_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->pInventoryMatrix);
+  {
+    std::array< int,126 > * resultptr = new std::array< int,126 >((const std::array< int,126 > &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__arrayT_int_126_t,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResFireBase_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResFireBase",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResFireBase",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResFireBase",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResFireBase_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResFireBase_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResFireBase = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResFireBase_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResFireBase",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResFireBase",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResFireBase_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResFireBase);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResAirBase_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResAirBase",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResAirBase",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResAirBase",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResAirBase_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResAirBase_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResAirBase = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResAirBase_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResAirBase",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResAirBase",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResAirBase_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResAirBase);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResWaterBase_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResWaterBase",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResWaterBase",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResWaterBase",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResWaterBase_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResWaterBase_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResWaterBase = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResWaterBase_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResWaterBase",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResWaterBase",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResWaterBase_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResWaterBase);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResEarthBase_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResEarthBase",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResEarthBase",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResEarthBase",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResEarthBase_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResEarthBase_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResEarthBase = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResEarthBase_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResEarthBase",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResEarthBase",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResEarthBase_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResEarthBase);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_177C_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::field_177C",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_177C",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::field_177C",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_177C_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_field_177C_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->field_177C = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_177C_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::field_177C",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_177C",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_177C_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->field_177C);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResMagicBase_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResMagicBase",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResMagicBase",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResMagicBase",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResMagicBase_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResMagicBase_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResMagicBase = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResMagicBase_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResMagicBase",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResMagicBase",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResMagicBase_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResMagicBase);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResSpiritBase_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResSpiritBase",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResSpiritBase",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResSpiritBase",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResSpiritBase_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResSpiritBase_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResSpiritBase = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResSpiritBase_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResSpiritBase",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResSpiritBase",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResSpiritBase_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResSpiritBase);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResMindBase_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResMindBase",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResMindBase",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResMindBase",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResMindBase_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResMindBase_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResMindBase = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResMindBase_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResMindBase",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResMindBase",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResMindBase_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResMindBase);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResBodyBase_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResBodyBase",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResBodyBase",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResBodyBase",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResBodyBase_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResBodyBase_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResBodyBase = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResBodyBase_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResBodyBase",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResBodyBase",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResBodyBase_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResBodyBase);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResLightBase_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResLightBase",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResLightBase",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResLightBase",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResLightBase_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResLightBase_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResLightBase = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResLightBase_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResLightBase",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResLightBase",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResLightBase_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResLightBase);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResDarkBase_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResDarkBase",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResDarkBase",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResDarkBase",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResDarkBase_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResDarkBase_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResDarkBase = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResDarkBase_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResDarkBase",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResDarkBase",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResDarkBase_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResDarkBase);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResFireBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResFireBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResFireBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResFireBonus",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResFireBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResFireBonus_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResFireBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResFireBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResFireBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResFireBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResFireBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResFireBonus);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResAirBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResAirBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResAirBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResAirBonus",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResAirBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResAirBonus_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResAirBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResAirBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResAirBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResAirBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResAirBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResAirBonus);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResWaterBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResWaterBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResWaterBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResWaterBonus",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResWaterBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResWaterBonus_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResWaterBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResWaterBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResWaterBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResWaterBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResWaterBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResWaterBonus);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResEarthBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResEarthBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResEarthBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResEarthBonus",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResEarthBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResEarthBonus_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResEarthBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResEarthBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResEarthBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResEarthBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResEarthBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResEarthBonus);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1792_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::field_1792",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1792",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::field_1792",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1792_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_field_1792_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->field_1792 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1792_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::field_1792",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1792",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1792_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->field_1792);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResMagicBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResMagicBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResMagicBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResMagicBonus",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResMagicBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResMagicBonus_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResMagicBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResMagicBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResMagicBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResMagicBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResMagicBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResMagicBonus);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResSpiritBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResSpiritBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResSpiritBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResSpiritBonus",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResSpiritBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResSpiritBonus_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResSpiritBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResSpiritBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResSpiritBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResSpiritBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResSpiritBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResSpiritBonus);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResMindBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResMindBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResMindBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResMindBonus",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResMindBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResMindBonus_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResMindBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResMindBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResMindBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResMindBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResMindBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResMindBonus);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResBodyBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResBodyBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResBodyBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResBodyBonus",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResBodyBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResBodyBonus_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResBodyBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResBodyBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResBodyBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResBodyBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResBodyBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResBodyBonus);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResLightBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResLightBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResLightBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResLightBonus",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResLightBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResLightBonus_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResLightBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResLightBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResLightBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResLightBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResLightBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResLightBonus);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResDarkBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::sResDarkBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResDarkBonus",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::sResDarkBonus",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResDarkBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_sResDarkBonus_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->sResDarkBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sResDarkBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::sResDarkBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sResDarkBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sResDarkBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->sResDarkBonus);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pPlayerBuffs_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  std::array< SpellBuff,24 > arg2 ;
+  std::array< SpellBuff,24 > *argp2 ;
+  
+  SWIG_check_num_args("Player::pPlayerBuffs",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pPlayerBuffs",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::pPlayerBuffs",2,"std::array< SpellBuff,24 >");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pPlayerBuffs_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_std__arrayT_SpellBuff_24_t,0))){
+    SWIG_fail_ptr("Player_pPlayerBuffs_set",2,SWIGTYPE_p_std__arrayT_SpellBuff_24_t);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->pPlayerBuffs = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pPlayerBuffs_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  std::array< SpellBuff,24 > result;
+  
+  SWIG_check_num_args("Player::pPlayerBuffs",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pPlayerBuffs",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pPlayerBuffs_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->pPlayerBuffs);
+  {
+    std::array< SpellBuff,24 > * resultptr = new std::array< SpellBuff,24 >((const std::array< SpellBuff,24 > &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__arrayT_SpellBuff_24_t,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uVoiceID_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  
+  SWIG_check_num_args("Player::uVoiceID",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uVoiceID",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::uVoiceID",2,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uVoiceID_set",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->uVoiceID = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uVoiceID_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::uVoiceID",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uVoiceID",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uVoiceID_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (unsigned int) ((arg1)->uVoiceID);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uPrevVoiceID_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::uPrevVoiceID",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uPrevVoiceID",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::uPrevVoiceID",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uPrevVoiceID_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->uPrevVoiceID = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uPrevVoiceID_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::uPrevVoiceID",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uPrevVoiceID",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uPrevVoiceID_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->uPrevVoiceID);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uPrevFace_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::uPrevFace",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uPrevFace",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::uPrevFace",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uPrevFace_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->uPrevFace = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uPrevFace_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::uPrevFace",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uPrevFace",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uPrevFace_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->uPrevFace);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_192C_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_192C",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_192C",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_192C",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_192C_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_192C = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_192C_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_192C",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_192C",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_192C_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_192C);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1930_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::field_1930",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1930",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::field_1930",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1930_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->field_1930 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1930_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::field_1930",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1930",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1930_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->field_1930);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uTimeToRecovery_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uTimeToRecovery",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uTimeToRecovery",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uTimeToRecovery",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uTimeToRecovery_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uTimeToRecovery_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uTimeToRecovery = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uTimeToRecovery_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uTimeToRecovery",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uTimeToRecovery",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uTimeToRecovery_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uTimeToRecovery);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1936_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::field_1936",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1936",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field_1936",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1936_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->field_1936 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1936_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::field_1936",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1936",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1936_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->field_1936);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1937_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::field_1937",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1937",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field_1937",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1937_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->field_1937 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1937_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::field_1937",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1937",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1937_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->field_1937);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uSkillPoints_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  
+  SWIG_check_num_args("Player::uSkillPoints",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uSkillPoints",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::uSkillPoints",2,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uSkillPoints_set",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->uSkillPoints = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uSkillPoints_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::uSkillPoints",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uSkillPoints",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uSkillPoints_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (unsigned int) ((arg1)->uSkillPoints);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sHealth_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::sHealth",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sHealth",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::sHealth",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sHealth_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->sHealth = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sHealth_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::sHealth",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sHealth",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sHealth_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->sHealth);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sMana_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::sMana",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sMana",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::sMana",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sMana_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->sMana = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_sMana_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::sMana",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::sMana",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_sMana_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->sMana);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uBirthYear_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int arg2 ;
+  
+  SWIG_check_num_args("Player::uBirthYear",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uBirthYear",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::uBirthYear",2,"unsigned int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uBirthYear_set",1,SWIGTYPE_p_Player);
+  }
+  
+  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
+  arg2 = (unsigned int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->uBirthYear = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uBirthYear_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned int result;
+  
+  SWIG_check_num_args("Player::uBirthYear",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uBirthYear",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uBirthYear_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (unsigned int) ((arg1)->uBirthYear);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pEquipment_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PlayerEquipment *arg2 = (PlayerEquipment *) 0 ;
+  
+  SWIG_check_num_args("Player::pEquipment",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pEquipment",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::pEquipment",2,"PlayerEquipment *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pEquipment_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_PlayerEquipment,0))){
+    SWIG_fail_ptr("Player_pEquipment_set",2,SWIGTYPE_p_PlayerEquipment);
+  }
+  
+  if (arg1) (arg1)->pEquipment = *arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pEquipment_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  PlayerEquipment *result = 0 ;
+  
+  SWIG_check_num_args("Player::pEquipment",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pEquipment",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pEquipment_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (PlayerEquipment *)& ((arg1)->pEquipment);
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_PlayerEquipment,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1988_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int *arg2 ;
+  
+  SWIG_check_num_args("Player::field_1988",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1988",1,"Player *");
+  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Player::field_1988",2,"int [49]");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1988_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_int,0))){
+    SWIG_fail_ptr("Player_field_1988_set",2,SWIGTYPE_p_int);
+  }
+  
+  {
+    size_t ii;
+    int *b = (int *) arg1->field_1988;
+    for (ii = 0; ii < (size_t)49; ii++) b[ii] = *((int *) arg2 + ii);
+  }
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1988_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int *result = 0 ;
+  
+  SWIG_check_num_args("Player::field_1988",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1988",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1988_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int *)(int *) ((arg1)->field_1988);
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_int,0); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A4C_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::field_1A4C",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A4C",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field_1A4C",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A4C_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->field_1A4C = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A4C_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::field_1A4C",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A4C",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A4C_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->field_1A4C);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A4D_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::field_1A4D",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A4D",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field_1A4D",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A4D_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->field_1A4D = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A4D_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::field_1A4D",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A4D",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A4D_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->field_1A4D);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_lastOpenedSpellbookPage_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::lastOpenedSpellbookPage",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::lastOpenedSpellbookPage",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::lastOpenedSpellbookPage",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_lastOpenedSpellbookPage_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->lastOpenedSpellbookPage = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_lastOpenedSpellbookPage_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::lastOpenedSpellbookPage",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::lastOpenedSpellbookPage",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_lastOpenedSpellbookPage_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->lastOpenedSpellbookPage);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uQuickSpell_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int8 arg2 ;
+  unsigned __int8 *argp2 ;
+  
+  SWIG_check_num_args("Player::uQuickSpell",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uQuickSpell",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uQuickSpell",2,"unsigned __int8");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uQuickSpell_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int8,0))){
+    SWIG_fail_ptr("Player_uQuickSpell_set",2,SWIGTYPE_p_unsigned___int8);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uQuickSpell = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uQuickSpell_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int8 result;
+  
+  SWIG_check_num_args("Player::uQuickSpell",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uQuickSpell",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uQuickSpell_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uQuickSpell);
+  {
+    unsigned __int8 * resultptr = new unsigned __int8((const unsigned __int8 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int8,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_playerEventBits_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char *arg2 ;
+  
+  SWIG_check_num_args("Player::playerEventBits",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::playerEventBits",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::playerEventBits",2,"char [64]");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_playerEventBits_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (char *)lua_tostring(L, 2);
+  {
+    if(arg2) {
+      strncpy((char*)arg1->playerEventBits, (const char *)arg2, 64-1);
+      arg1->playerEventBits[64-1] = 0;
+    } else {
+      arg1->playerEventBits[0] = 0;
+    }
+  }
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_playerEventBits_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char *result = 0 ;
+  
+  SWIG_check_num_args("Player::playerEventBits",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::playerEventBits",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_playerEventBits_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char *)(char *) ((arg1)->playerEventBits);
+  lua_pushstring(L,(const char *)result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__some_attack_bonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::_some_attack_bonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_some_attack_bonus",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::_some_attack_bonus",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__some_attack_bonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->_some_attack_bonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__some_attack_bonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::_some_attack_bonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_some_attack_bonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__some_attack_bonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->_some_attack_bonus);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A91_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::field_1A91",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A91",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field_1A91",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A91_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->field_1A91 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A91_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::field_1A91",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A91",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A91_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->field_1A91);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__melee_dmg_bonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::_melee_dmg_bonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_melee_dmg_bonus",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::_melee_dmg_bonus",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__melee_dmg_bonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->_melee_dmg_bonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__melee_dmg_bonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::_melee_dmg_bonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_melee_dmg_bonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__melee_dmg_bonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->_melee_dmg_bonus);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A93_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::field_1A93",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A93",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field_1A93",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A93_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->field_1A93 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A93_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::field_1A93",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A93",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A93_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->field_1A93);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__ranged_atk_bonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::_ranged_atk_bonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_ranged_atk_bonus",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::_ranged_atk_bonus",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__ranged_atk_bonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->_ranged_atk_bonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__ranged_atk_bonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::_ranged_atk_bonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_ranged_atk_bonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__ranged_atk_bonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->_ranged_atk_bonus);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A95_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::field_1A95",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A95",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field_1A95",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A95_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->field_1A95 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A95_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::field_1A95",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A95",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A95_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->field_1A95);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__ranged_dmg_bonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::_ranged_dmg_bonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_ranged_dmg_bonus",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::_ranged_dmg_bonus",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__ranged_dmg_bonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->_ranged_dmg_bonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__ranged_dmg_bonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::_ranged_dmg_bonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_ranged_dmg_bonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__ranged_dmg_bonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->_ranged_dmg_bonus);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A97_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::field_1A97",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A97",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field_1A97",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A97_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->field_1A97 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1A97_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::field_1A97",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1A97",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1A97_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->field_1A97);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uFullHealthBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::uFullHealthBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uFullHealthBonus",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::uFullHealthBonus",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uFullHealthBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->uFullHealthBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uFullHealthBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::uFullHealthBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uFullHealthBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uFullHealthBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->uFullHealthBonus);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__health_related_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::_health_related",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_health_related",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::_health_related",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__health_related_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->_health_related = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__health_related_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::_health_related",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_health_related",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__health_related_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->_health_related);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uFullManaBonus_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::uFullManaBonus",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uFullManaBonus",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::uFullManaBonus",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uFullManaBonus_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->uFullManaBonus = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uFullManaBonus_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::uFullManaBonus",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uFullManaBonus",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uFullManaBonus_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->uFullManaBonus);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__mana_related_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::_mana_related",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_mana_related",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::_mana_related",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__mana_related_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->_mana_related = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__mana_related_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::_mana_related",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_mana_related",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__mana_related_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->_mana_related);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_expression_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  CHARACTER_EXPRESSION_ID arg2 ;
+  
+  SWIG_check_num_args("Player::expression",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::expression",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::expression",2,"CHARACTER_EXPRESSION_ID");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_expression_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (CHARACTER_EXPRESSION_ID)(int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->expression = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_expression_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  CHARACTER_EXPRESSION_ID result;
+  
+  SWIG_check_num_args("Player::expression",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::expression",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_expression_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (CHARACTER_EXPRESSION_ID) ((arg1)->expression);
+  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uExpressionTimePassed_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uExpressionTimePassed",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uExpressionTimePassed",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uExpressionTimePassed",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uExpressionTimePassed_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uExpressionTimePassed_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uExpressionTimePassed = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uExpressionTimePassed_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uExpressionTimePassed",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uExpressionTimePassed",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uExpressionTimePassed_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uExpressionTimePassed);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uExpressionTimeLength_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 arg2 ;
+  unsigned __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::uExpressionTimeLength",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uExpressionTimeLength",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::uExpressionTimeLength",2,"unsigned __int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uExpressionTimeLength_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_unsigned___int16,0))){
+    SWIG_fail_ptr("Player_uExpressionTimeLength_set",2,SWIGTYPE_p_unsigned___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->uExpressionTimeLength = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uExpressionTimeLength_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  unsigned __int16 result;
+  
+  SWIG_check_num_args("Player::uExpressionTimeLength",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uExpressionTimeLength",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uExpressionTimeLength_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->uExpressionTimeLength);
+  {
+    unsigned __int16 * resultptr = new unsigned __int16((const unsigned __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_unsigned___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1AA2_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 arg2 ;
+  __int16 *argp2 ;
+  
+  SWIG_check_num_args("Player::field_1AA2",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1AA2",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::field_1AA2",2,"__int16");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1AA2_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p___int16,0))){
+    SWIG_fail_ptr("Player_field_1AA2_set",2,SWIGTYPE_p___int16);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->field_1AA2 = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1AA2_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  __int16 result;
+  
+  SWIG_check_num_args("Player::field_1AA2",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1AA2",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1AA2_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->field_1AA2);
+  {
+    __int16 * resultptr = new __int16((const __int16 &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p___int16,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__expression21_animtime_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::_expression21_animtime",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_expression21_animtime",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::_expression21_animtime",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__expression21_animtime_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->_expression21_animtime = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__expression21_animtime_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::_expression21_animtime",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_expression21_animtime",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__expression21_animtime_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->_expression21_animtime);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__expression21_frameset_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int arg2 ;
+  
+  SWIG_check_num_args("Player::_expression21_frameset",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_expression21_frameset",1,"Player *");
+  if(!lua_isnumber(L,2)) SWIG_fail_arg("Player::_expression21_frameset",2,"int");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__expression21_frameset_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (int)lua_tonumber(L, 2);
+  if (arg1) (arg1)->_expression21_frameset = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player__expression21_frameset_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  int result;
+  
+  SWIG_check_num_args("Player::_expression21_frameset",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::_expression21_frameset",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player__expression21_frameset_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (int) ((arg1)->_expression21_frameset);
+  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pInstalledBeacons_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  std::array< LloydBeacon,5 > arg2 ;
+  std::array< LloydBeacon,5 > *argp2 ;
+  
+  SWIG_check_num_args("Player::pInstalledBeacons",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pInstalledBeacons",1,"Player *");
+  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Player::pInstalledBeacons",2,"std::array< LloydBeacon,5 >");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pInstalledBeacons_set",1,SWIGTYPE_p_Player);
+  }
+  
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_std__arrayT_LloydBeacon_5_t,0))){
+    SWIG_fail_ptr("Player_pInstalledBeacons_set",2,SWIGTYPE_p_std__arrayT_LloydBeacon_5_t);
+  }
+  arg2 = *argp2;
+  
+  if (arg1) (arg1)->pInstalledBeacons = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_pInstalledBeacons_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  std::array< LloydBeacon,5 > result;
+  
+  SWIG_check_num_args("Player::pInstalledBeacons",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::pInstalledBeacons",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_pInstalledBeacons_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result =  ((arg1)->pInstalledBeacons);
+  {
+    std::array< LloydBeacon,5 > * resultptr = new std::array< LloydBeacon,5 >((const std::array< LloydBeacon,5 > &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__arrayT_LloydBeacon_5_t,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uNumDivineInterventionCastsThisDay_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::uNumDivineInterventionCastsThisDay",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uNumDivineInterventionCastsThisDay",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::uNumDivineInterventionCastsThisDay",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uNumDivineInterventionCastsThisDay_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->uNumDivineInterventionCastsThisDay = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uNumDivineInterventionCastsThisDay_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::uNumDivineInterventionCastsThisDay",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uNumDivineInterventionCastsThisDay",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uNumDivineInterventionCastsThisDay_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->uNumDivineInterventionCastsThisDay);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uNumArmageddonCasts_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::uNumArmageddonCasts",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uNumArmageddonCasts",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::uNumArmageddonCasts",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uNumArmageddonCasts_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->uNumArmageddonCasts = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uNumArmageddonCasts_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::uNumArmageddonCasts",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uNumArmageddonCasts",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uNumArmageddonCasts_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->uNumArmageddonCasts);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uNumFireSpikeCasts_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::uNumFireSpikeCasts",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uNumFireSpikeCasts",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::uNumFireSpikeCasts",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uNumFireSpikeCasts_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->uNumFireSpikeCasts = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_uNumFireSpikeCasts_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::uNumFireSpikeCasts",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::uNumFireSpikeCasts",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_uNumFireSpikeCasts_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->uNumFireSpikeCasts);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1B3B_set(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char arg2 ;
+  
+  SWIG_check_num_args("Player::field_1B3B",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1B3B",1,"Player *");
+  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Player::field_1B3B",2,"char");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1B3B_set",1,SWIGTYPE_p_Player);
+  }
+  
+  arg2 = (lua_tostring(L, 2))[0];
+  if (arg1) (arg1)->field_1B3B = arg2;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_Player_field_1B3B_get(lua_State* L) {
+  int SWIG_arg = 0;
+  Player *arg1 = (Player *) 0 ;
+  char result;
+  
+  SWIG_check_num_args("Player::field_1B3B",1,1)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Player::field_1B3B",1,"Player *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Player,0))){
+    SWIG_fail_ptr("Player_field_1B3B_get",1,SWIGTYPE_p_Player);
+  }
+  
+  result = (char) ((arg1)->field_1B3B);
+  lua_pushfstring(L,"%c",result); SWIG_arg++;
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static void swig_delete_Player(void *obj) {
+Player *arg1 = (Player *) obj;
+delete arg1;
+}
+static swig_lua_method swig_Player_methods[] = {
+    {"SetVariable", _wrap_Player_SetVariable}, 
+    {"AddVariable", _wrap_Player_AddVariable}, 
+    {"SubtractVariable", _wrap_Player_SubtractVariable}, 
+    {"CompareVariable", _wrap_Player_CompareVariable}, 
+    {"UseItem_DrinkPotion_etc", _wrap_Player_UseItem_DrinkPotion_etc}, 
+    {"GetActualAttribute", _wrap_Player_GetActualAttribute}, 
+    {"GetBaseStrength", _wrap_Player_GetBaseStrength}, 
+    {"GetBaseIntelligence", _wrap_Player_GetBaseIntelligence}, 
+    {"GetBaseWillpower", _wrap_Player_GetBaseWillpower}, 
+    {"GetBaseEndurance", _wrap_Player_GetBaseEndurance}, 
+    {"GetBaseAccuracy", _wrap_Player_GetBaseAccuracy}, 
+    {"GetBaseSpeed", _wrap_Player_GetBaseSpeed}, 
+    {"GetBaseLuck", _wrap_Player_GetBaseLuck}, 
+    {"GetBaseLevel", _wrap_Player_GetBaseLevel}, 
+    {"GetActualLevel", _wrap_Player_GetActualLevel}, 
+    {"GetActualMight", _wrap_Player_GetActualMight}, 
+    {"GetActualIntelligence", _wrap_Player_GetActualIntelligence}, 
+    {"GetActualWillpower", _wrap_Player_GetActualWillpower}, 
+    {"GetActualEndurance", _wrap_Player_GetActualEndurance}, 
+    {"GetActualAccuracy", _wrap_Player_GetActualAccuracy}, 
+    {"GetActualSpeed", _wrap_Player_GetActualSpeed}, 
+    {"GetActualLuck", _wrap_Player_GetActualLuck}, 
+    {"GetActualAttack", _wrap_Player_GetActualAttack}, 
+    {"GetMeleeDamageMinimal", _wrap_Player_GetMeleeDamageMinimal}, 
+    {"GetMeleeDamageMaximal", _wrap_Player_GetMeleeDamageMaximal}, 
+    {"CalculateMeleeDamageTo", _wrap_Player_CalculateMeleeDamageTo}, 
+    {"GetRangedAttack", _wrap_Player_GetRangedAttack}, 
+    {"GetRangedDamageMin", _wrap_Player_GetRangedDamageMin}, 
+    {"GetRangedDamageMax", _wrap_Player_GetRangedDamageMax}, 
+    {"CalculateRangedDamageTo", _wrap_Player_CalculateRangedDamageTo}, 
+    {"GetMeleeDamageString", _wrap_Player_GetMeleeDamageString}, 
+    {"GetRangedDamageString", _wrap_Player_GetRangedDamageString}, 
+    {"CanTrainToNextLevel", _wrap_Player_CanTrainToNextLevel}, 
+    {"GetExperienceDisplayColor", _wrap_Player_GetExperienceDisplayColor}, 
+    {"CalculateIncommingDamage", _wrap_Player_CalculateIncommingDamage}, 
+    {"GetEquippedItemEquipType", _wrap_Player_GetEquippedItemEquipType}, 
+    {"GetEquippedItemSkillType", _wrap_Player_GetEquippedItemSkillType}, 
+    {"IsUnarmed", _wrap_Player_IsUnarmed}, 
+    {"HasItemEquipped", _wrap_Player_HasItemEquipped}, 
+    {"HasEnchantedItemEquipped", _wrap_Player_HasEnchantedItemEquipped}, 
+    {"WearsItem", _wrap_Player_WearsItem}, 
+    {"StealFromShop", _wrap_Player_StealFromShop}, 
+    {"StealFromActor", _wrap_Player_StealFromActor}, 
+    {"Heal", _wrap_Player_Heal}, 
+    {"ReceiveDamage", _wrap_Player_ReceiveDamage}, 
+    {"ReceiveSpecialAttackEffect", _wrap_Player_ReceiveSpecialAttackEffect}, 
+    {"GetSpellSchool", _wrap_Player_GetSpellSchool}, 
+    {"GetAttackRecoveryTime", _wrap_Player_GetAttackRecoveryTime}, 
+    {"GetMaxHealth", _wrap_Player_GetMaxHealth}, 
+    {"GetMaxMana", _wrap_Player_GetMaxMana}, 
+    {"GetBaseAC", _wrap_Player_GetBaseAC}, 
+    {"GetActualAC", _wrap_Player_GetActualAC}, 
+    {"GetBaseAge", _wrap_Player_GetBaseAge}, 
+    {"GetActualAge", _wrap_Player_GetActualAge}, 
+    {"GetBaseResistance", _wrap_Player_GetBaseResistance}, 
+    {"GetActualResistance", _wrap_Player_GetActualResistance}, 
+    {"SetRecoveryTime", _wrap_Player_SetRecoveryTime}, 
+    {"RandomizeName", _wrap_Player_RandomizeName}, 
+    {"GetMajorConditionIdx", _wrap_Player_GetMajorConditionIdx}, 
+    {"GetParameterBonus", _wrap_Player_GetParameterBonus}, 
+    {"GetSpecialItemBonus", _wrap_Player_GetSpecialItemBonus}, 
+    {"GetItemsBonus", _wrap_Player_GetItemsBonus}, 
+    {"GetMagicalBonus", _wrap_Player_GetMagicalBonus}, 
+    {"GetActualSkillLevel", _wrap_Player_GetActualSkillLevel}, 
+    {"GetSkillBonus", _wrap_Player_GetSkillBonus}, 
+    {"GetRace", _wrap_Player_GetRace}, 
+    {"GetSexByVoice", _wrap_Player_GetSexByVoice}, 
+    {"SetInitialStats", _wrap_Player_SetInitialStats}, 
+    {"SetSexByVoice", _wrap_Player_SetSexByVoice}, 
+    {"Reset", _wrap_Player_Reset}, 
+    {"GetSkillIdxByOrder", _wrap_Player_GetSkillIdxByOrder}, 
+    {"DecreaseAttribute", _wrap_Player_DecreaseAttribute}, 
+    {"IncreaseAttribute", _wrap_Player_IncreaseAttribute}, 
+    {"Zero", _wrap_Player_Zero}, 
+    {"GetStatColor", _wrap_Player_GetStatColor}, 
+    {"DiscardConditionIfLastsLongerThan", _wrap_Player_DiscardConditionIfLastsLongerThan}, 
+    {"SelectPhrasesTransaction", _wrap_Player_SelectPhrasesTransaction}, 
+    {"GetBodybuilding", _wrap_Player_GetBodybuilding}, 
+    {"GetMeditation", _wrap_Player_GetMeditation}, 
+    {"CanIdentify", _wrap_Player_CanIdentify}, 
+    {"CanRepair", _wrap_Player_CanRepair}, 
+    {"GetMerchant", _wrap_Player_GetMerchant}, 
+    {"GetPerception", _wrap_Player_GetPerception}, 
+    {"GetDisarmTrap", _wrap_Player_GetDisarmTrap}, 
+    {"GetLearningPercent", _wrap_Player_GetLearningPercent}, 
+    {"CanFitItem", _wrap_Player_CanFitItem}, 
+    {"FindFreeInventoryListSlot", _wrap_Player_FindFreeInventoryListSlot}, 
+    {"CreateItemInInventory", _wrap_Player_CreateItemInInventory}, 
+    {"HasSkill", _wrap_Player_HasSkill}, 
+    {"WearItem", _wrap_Player_WearItem}, 
+    {"AddItem", _wrap_Player_AddItem}, 
+    {"AddItem2", _wrap_Player_AddItem2}, 
+    {"CreateItemInInventory2", _wrap_Player_CreateItemInInventory2}, 
+    {"PutItemArInventoryIndex", _wrap_Player_PutItemArInventoryIndex}, 
+    {"RemoveItemAtInventoryIndex", _wrap_Player_RemoveItemAtInventoryIndex}, 
+    {"CanAct", _wrap_Player_CanAct}, 
+    {"CanSteal", _wrap_Player_CanSteal}, 
+    {"CanEquip_RaceAndAlignmentCheck", _wrap_Player_CanEquip_RaceAndAlignmentCheck}, 
+    {"SetCondition", _wrap_Player_SetCondition}, 
+    {"ProfessionOrGuildFlagsCorrect", _wrap_Player_ProfessionOrGuildFlagsCorrect}, 
+    {"PlaySound", _wrap_Player_PlaySound}, 
+    {"PlayEmotion", _wrap_Player_PlayEmotion}, 
+    {"ItemsEnchant", _wrap_Player_ItemsEnchant}, 
+    {"GetItemIDAtInventoryIndex", _wrap_Player_GetItemIDAtInventoryIndex}, 
+    {"IsPlayerHealableByTemple", _wrap_Player_IsPlayerHealableByTemple}, 
+    {"GetBaseIdentifyPrice", _wrap_Player_GetBaseIdentifyPrice}, 
+    {"GetBaseRepairPrice", _wrap_Player_GetBaseRepairPrice}, 
+    {"GetBaseBuyingPrice", _wrap_Player_GetBaseBuyingPrice}, 
+    {"GetBaseSellingPrice", _wrap_Player_GetBaseSellingPrice}, 
+    {"GetPriceRepair", _wrap_Player_GetPriceRepair}, 
+    {"GetPriceIdentification", _wrap_Player_GetPriceIdentification}, 
+    {"GetBuyingPrice", _wrap_Player_GetBuyingPrice}, 
+    {"GetPriceSell", _wrap_Player_GetPriceSell}, 
+    {"GetTempleHealCostModifier", _wrap_Player_GetTempleHealCostModifier}, 
+    {"GetConditionDayOfWeek", _wrap_Player_GetConditionDayOfWeek}, 
+    {"NothingOrJustBlastersEquipped", _wrap_Player_NothingOrJustBlastersEquipped}, 
+    {"SalesProcess", _wrap_Player_SalesProcess}, 
+    {"Recover", _wrap_Player_Recover}, 
+    {"CanCastSpell", _wrap_Player_CanCastSpell}, 
+    {"PlayAwardSound", _wrap_Player_PlayAwardSound}, 
+    {"EquipBody", _wrap_Player_EquipBody}, 
+    {"HasUnderwaterSuitEquipped", _wrap_Player_HasUnderwaterSuitEquipped}, 
+    {"HasItem", _wrap_Player_HasItem}, 
+    {"OnInventoryLeftClick", _wrap_Player_OnInventoryLeftClick}, 
+    {"GetMultiplierForSkillLevel", _wrap_Player_GetMultiplierForSkillLevel}, 
+    {"CalculateMeleeDmgToEnemyWithWeapon", _wrap_Player_CalculateMeleeDmgToEnemyWithWeapon}, 
+    {"WearsItemAnyWhere", _wrap_Player_WearsItemAnyWhere}, 
+    {"GetArmorRecoveryMultiplierFromSkillLevel", _wrap_Player_GetArmorRecoveryMultiplierFromSkillLevel}, 
+    {"SetSkillByEvent", _wrap_Player_SetSkillByEvent}, 
+    {"AddSkillByEvent", _wrap_Player_AddSkillByEvent}, 
+    {"PlayAwardSound_Anim", _wrap_Player_PlayAwardSound_Anim}, 
+    {"PlayAwardSound_Anim_Face", _wrap_Player_PlayAwardSound_Anim_Face}, 
+    {"PlayAwardSound_Anim97", _wrap_Player_PlayAwardSound_Anim97}, 
+    {"PlayAwardSound_Anim97_Face", _wrap_Player_PlayAwardSound_Anim97_Face}, 
+    {"PlayAwardSound_Anim98", _wrap_Player_PlayAwardSound_Anim98}, 
+    {"PlayAwardSound_Anim98_Face", _wrap_Player_PlayAwardSound_Anim98_Face}, 
+    {"IsWeak", _wrap_Player_IsWeak}, 
+    {"IsDead", _wrap_Player_IsDead}, 
+    {"IsEradicated", _wrap_Player_IsEradicated}, 
+    {"IsZombie", _wrap_Player_IsZombie}, 
+    {"IsCursed", _wrap_Player_IsCursed}, 
+    {"IsPertified", _wrap_Player_IsPertified}, 
+    {"IsUnconcious", _wrap_Player_IsUnconcious}, 
+    {"IsAsleep", _wrap_Player_IsAsleep}, 
+    {"IsParalyzed", _wrap_Player_IsParalyzed}, 
+    {"IsDrunk", _wrap_Player_IsDrunk}, 
+    {"SetCursed", _wrap_Player_SetCursed}, 
+    {"SetWeak", _wrap_Player_SetWeak}, 
+    {"SetAsleep", _wrap_Player_SetAsleep}, 
+    {"SetAfraid", _wrap_Player_SetAfraid}, 
+    {"SetDrunk", _wrap_Player_SetDrunk}, 
+    {"SetInsane", _wrap_Player_SetInsane}, 
+    {"SetPoison1", _wrap_Player_SetPoison1}, 
+    {"SetDisease1", _wrap_Player_SetDisease1}, 
+    {"SetPoison2", _wrap_Player_SetPoison2}, 
+    {"SetDisease2", _wrap_Player_SetDisease2}, 
+    {"SetPoison3", _wrap_Player_SetPoison3}, 
+    {"SetDisease3", _wrap_Player_SetDisease3}, 
+    {"SetParalyzed", _wrap_Player_SetParalyzed}, 
+    {"SetUnconcious", _wrap_Player_SetUnconcious}, 
+    {"SetDead", _wrap_Player_SetDead}, 
+    {"SetPertified", _wrap_Player_SetPertified}, 
+    {"SetEradicated", _wrap_Player_SetEradicated}, 
+    {"SetZombie", _wrap_Player_SetZombie}, 
+    {"SetCondWeakWithBlockCheck", _wrap_Player_SetCondWeakWithBlockCheck}, 
+    {"SetCondInsaneWithBlockCheck", _wrap_Player_SetCondInsaneWithBlockCheck}, 
+    {"SetCondDeadWithBlockCheck", _wrap_Player_SetCondDeadWithBlockCheck}, 
+    {"SetCondUnconsciousWithBlockCheck", _wrap_Player_SetCondUnconsciousWithBlockCheck}, 
+    {"IsRaceHuman", _wrap_Player_IsRaceHuman}, 
+    {"IsRaceDwarf", _wrap_Player_IsRaceDwarf}, 
+    {"IsRaceElf", _wrap_Player_IsRaceElf}, 
+    {"IsRaceGoblin", _wrap_Player_IsRaceGoblin}, 
+    {"IsMale", _wrap_Player_IsMale}, 
+    {"IsFemale", _wrap_Player_IsFemale}, 
+    {"GetMainHandItem", _wrap_Player_GetMainHandItem}, 
+    {"GetOffHandItem", _wrap_Player_GetOffHandItem}, 
+    {"GetBowItem", _wrap_Player_GetBowItem}, 
+    {"GetArmorItem", _wrap_Player_GetArmorItem}, 
+    {"GetHelmItem", _wrap_Player_GetHelmItem}, 
+    {"GetBeltItem", _wrap_Player_GetBeltItem}, 
+    {"GetCloakItem", _wrap_Player_GetCloakItem}, 
+    {"GetGloveItem", _wrap_Player_GetGloveItem}, 
+    {"GetBootItem", _wrap_Player_GetBootItem}, 
+    {"GetAmuletItem", _wrap_Player_GetAmuletItem}, 
+    {"GetNthRingItem", _wrap_Player_GetNthRingItem}, 
+    {"GetNthEquippedIndexItem", _wrap_Player_GetNthEquippedIndexItem}, 
+    {"GetItem", _wrap_Player_GetItem}, 
+    {"GetPlayerIndex", _wrap_Player_GetPlayerIndex}, 
+    {0,0}
+};
+static swig_lua_attribute swig_Player_attributes[] = {
+    { "pConditions", _wrap_Player_pConditions_get, _wrap_Player_pConditions_set},
+    { "uExperience", _wrap_Player_uExperience_get, _wrap_Player_uExperience_set},
+    { "pName", _wrap_Player_pName_get, _wrap_Player_pName_set},
+    { "uSex", _wrap_Player_uSex_get, _wrap_Player_uSex_set},
+    { "classType", _wrap_Player_classType_get, _wrap_Player_classType_set},
+    { "uCurrentFace", _wrap_Player_uCurrentFace_get, _wrap_Player_uCurrentFace_set},
+    { "field_BB", _wrap_Player_field_BB_get, _wrap_Player_field_BB_set},
+    { "uMight", _wrap_Player_uMight_get, _wrap_Player_uMight_set},
+    { "uMightBonus", _wrap_Player_uMightBonus_get, _wrap_Player_uMightBonus_set},
+    { "uIntelligence", _wrap_Player_uIntelligence_get, _wrap_Player_uIntelligence_set},
+    { "uIntelligenceBonus", _wrap_Player_uIntelligenceBonus_get, _wrap_Player_uIntelligenceBonus_set},
+    { "uWillpower", _wrap_Player_uWillpower_get, _wrap_Player_uWillpower_set},
+    { "uWillpowerBonus", _wrap_Player_uWillpowerBonus_get, _wrap_Player_uWillpowerBonus_set},
+    { "uEndurance", _wrap_Player_uEndurance_get, _wrap_Player_uEndurance_set},
+    { "uEnduranceBonus", _wrap_Player_uEnduranceBonus_get, _wrap_Player_uEnduranceBonus_set},
+    { "uSpeed", _wrap_Player_uSpeed_get, _wrap_Player_uSpeed_set},
+    { "uSpeedBonus", _wrap_Player_uSpeedBonus_get, _wrap_Player_uSpeedBonus_set},
+    { "uAccuracy", _wrap_Player_uAccuracy_get, _wrap_Player_uAccuracy_set},
+    { "uAccuracyBonus", _wrap_Player_uAccuracyBonus_get, _wrap_Player_uAccuracyBonus_set},
+    { "uLuck", _wrap_Player_uLuck_get, _wrap_Player_uLuck_set},
+    { "uLuckBonus", _wrap_Player_uLuckBonus_get, _wrap_Player_uLuckBonus_set},
+    { "sACModifier", _wrap_Player_sACModifier_get, _wrap_Player_sACModifier_set},
+    { "uLevel", _wrap_Player_uLevel_get, _wrap_Player_uLevel_set},
+    { "sLevelModifier", _wrap_Player_sLevelModifier_get, _wrap_Player_sLevelModifier_set},
+    { "sAgeModifier", _wrap_Player_sAgeModifier_get, _wrap_Player_sAgeModifier_set},
+    { "field_E0", _wrap_Player_field_E0_get, _wrap_Player_field_E0_set},
+    { "field_E4", _wrap_Player_field_E4_get, _wrap_Player_field_E4_set},
+    { "field_E8", _wrap_Player_field_E8_get, _wrap_Player_field_E8_set},
+    { "field_EC", _wrap_Player_field_EC_get, _wrap_Player_field_EC_set},
+    { "field_F0", _wrap_Player_field_F0_get, _wrap_Player_field_F0_set},
+    { "field_F4", _wrap_Player_field_F4_get, _wrap_Player_field_F4_set},
+    { "field_F8", _wrap_Player_field_F8_get, _wrap_Player_field_F8_set},
+    { "field_FC", _wrap_Player_field_FC_get, _wrap_Player_field_FC_set},
+    { "field_100", _wrap_Player_field_100_get, _wrap_Player_field_100_set},
+    { "field_104", _wrap_Player_field_104_get, _wrap_Player_field_104_set},
+    { "_achieved_awards_bits", _wrap_Player__achieved_awards_bits_get, _wrap_Player__achieved_awards_bits_set},
+    { "spellbook", _wrap_Player_spellbook_get, _wrap_Player_spellbook_set},
+    { "field__1F5", _wrap_Player_field__1F5_get, _wrap_Player_field__1F5_set},
+    { "pure_luck_used", _wrap_Player_pure_luck_used_get, _wrap_Player_pure_luck_used_set},
+    { "pure_speed_used", _wrap_Player_pure_speed_used_get, _wrap_Player_pure_speed_used_set},
+    { "pure_intellect_used", _wrap_Player_pure_intellect_used_get, _wrap_Player_pure_intellect_used_set},
+    { "pure_endurance_used", _wrap_Player_pure_endurance_used_get, _wrap_Player_pure_endurance_used_set},
+    { "pure_willpower_used", _wrap_Player_pure_willpower_used_get, _wrap_Player_pure_willpower_used_set},
+    { "pure_accuracy_used", _wrap_Player_pure_accuracy_used_get, _wrap_Player_pure_accuracy_used_set},
+    { "pure_might_used", _wrap_Player_pure_might_used_get, _wrap_Player_pure_might_used_set},
+    { "pInventoryMatrix", _wrap_Player_pInventoryMatrix_get, _wrap_Player_pInventoryMatrix_set},
+    { "sResFireBase", _wrap_Player_sResFireBase_get, _wrap_Player_sResFireBase_set},
+    { "sResAirBase", _wrap_Player_sResAirBase_get, _wrap_Player_sResAirBase_set},
+    { "sResWaterBase", _wrap_Player_sResWaterBase_get, _wrap_Player_sResWaterBase_set},
+    { "sResEarthBase", _wrap_Player_sResEarthBase_get, _wrap_Player_sResEarthBase_set},
+    { "field_177C", _wrap_Player_field_177C_get, _wrap_Player_field_177C_set},
+    { "sResMagicBase", _wrap_Player_sResMagicBase_get, _wrap_Player_sResMagicBase_set},
+    { "sResSpiritBase", _wrap_Player_sResSpiritBase_get, _wrap_Player_sResSpiritBase_set},
+    { "sResMindBase", _wrap_Player_sResMindBase_get, _wrap_Player_sResMindBase_set},
+    { "sResBodyBase", _wrap_Player_sResBodyBase_get, _wrap_Player_sResBodyBase_set},
+    { "sResLightBase", _wrap_Player_sResLightBase_get, _wrap_Player_sResLightBase_set},
+    { "sResDarkBase", _wrap_Player_sResDarkBase_get, _wrap_Player_sResDarkBase_set},
+    { "sResFireBonus", _wrap_Player_sResFireBonus_get, _wrap_Player_sResFireBonus_set},
+    { "sResAirBonus", _wrap_Player_sResAirBonus_get, _wrap_Player_sResAirBonus_set},
+    { "sResWaterBonus", _wrap_Player_sResWaterBonus_get, _wrap_Player_sResWaterBonus_set},
+    { "sResEarthBonus", _wrap_Player_sResEarthBonus_get, _wrap_Player_sResEarthBonus_set},
+    { "field_1792", _wrap_Player_field_1792_get, _wrap_Player_field_1792_set},
+    { "sResMagicBonus", _wrap_Player_sResMagicBonus_get, _wrap_Player_sResMagicBonus_set},
+    { "sResSpiritBonus", _wrap_Player_sResSpiritBonus_get, _wrap_Player_sResSpiritBonus_set},
+    { "sResMindBonus", _wrap_Player_sResMindBonus_get, _wrap_Player_sResMindBonus_set},
+    { "sResBodyBonus", _wrap_Player_sResBodyBonus_get, _wrap_Player_sResBodyBonus_set},
+    { "sResLightBonus", _wrap_Player_sResLightBonus_get, _wrap_Player_sResLightBonus_set},
+    { "sResDarkBonus", _wrap_Player_sResDarkBonus_get, _wrap_Player_sResDarkBonus_set},
+    { "pPlayerBuffs", _wrap_Player_pPlayerBuffs_get, _wrap_Player_pPlayerBuffs_set},
+    { "uVoiceID", _wrap_Player_uVoiceID_get, _wrap_Player_uVoiceID_set},
+    { "uPrevVoiceID", _wrap_Player_uPrevVoiceID_get, _wrap_Player_uPrevVoiceID_set},
+    { "uPrevFace", _wrap_Player_uPrevFace_get, _wrap_Player_uPrevFace_set},
+    { "field_192C", _wrap_Player_field_192C_get, _wrap_Player_field_192C_set},
+    { "field_1930", _wrap_Player_field_1930_get, _wrap_Player_field_1930_set},
+    { "uTimeToRecovery", _wrap_Player_uTimeToRecovery_get, _wrap_Player_uTimeToRecovery_set},
+    { "field_1936", _wrap_Player_field_1936_get, _wrap_Player_field_1936_set},
+    { "field_1937", _wrap_Player_field_1937_get, _wrap_Player_field_1937_set},
+    { "uSkillPoints", _wrap_Player_uSkillPoints_get, _wrap_Player_uSkillPoints_set},
+    { "sHealth", _wrap_Player_sHealth_get, _wrap_Player_sHealth_set},
+    { "sMana", _wrap_Player_sMana_get, _wrap_Player_sMana_set},
+    { "uBirthYear", _wrap_Player_uBirthYear_get, _wrap_Player_uBirthYear_set},
+    { "pEquipment", _wrap_Player_pEquipment_get, _wrap_Player_pEquipment_set},
+    { "field_1988", _wrap_Player_field_1988_get, _wrap_Player_field_1988_set},
+    { "field_1A4C", _wrap_Player_field_1A4C_get, _wrap_Player_field_1A4C_set},
+    { "field_1A4D", _wrap_Player_field_1A4D_get, _wrap_Player_field_1A4D_set},
+    { "lastOpenedSpellbookPage", _wrap_Player_lastOpenedSpellbookPage_get, _wrap_Player_lastOpenedSpellbookPage_set},
+    { "uQuickSpell", _wrap_Player_uQuickSpell_get, _wrap_Player_uQuickSpell_set},
+    { "playerEventBits", _wrap_Player_playerEventBits_get, _wrap_Player_playerEventBits_set},
+    { "_some_attack_bonus", _wrap_Player__some_attack_bonus_get, _wrap_Player__some_attack_bonus_set},
+    { "field_1A91", _wrap_Player_field_1A91_get, _wrap_Player_field_1A91_set},
+    { "_melee_dmg_bonus", _wrap_Player__melee_dmg_bonus_get, _wrap_Player__melee_dmg_bonus_set},
+    { "field_1A93", _wrap_Player_field_1A93_get, _wrap_Player_field_1A93_set},
+    { "_ranged_atk_bonus", _wrap_Player__ranged_atk_bonus_get, _wrap_Player__ranged_atk_bonus_set},
+    { "field_1A95", _wrap_Player_field_1A95_get, _wrap_Player_field_1A95_set},
+    { "_ranged_dmg_bonus", _wrap_Player__ranged_dmg_bonus_get, _wrap_Player__ranged_dmg_bonus_set},
+    { "field_1A97", _wrap_Player_field_1A97_get, _wrap_Player_field_1A97_set},
+    { "uFullHealthBonus", _wrap_Player_uFullHealthBonus_get, _wrap_Player_uFullHealthBonus_set},
+    { "_health_related", _wrap_Player__health_related_get, _wrap_Player__health_related_set},
+    { "uFullManaBonus", _wrap_Player_uFullManaBonus_get, _wrap_Player_uFullManaBonus_set},
+    { "_mana_related", _wrap_Player__mana_related_get, _wrap_Player__mana_related_set},
+    { "expression", _wrap_Player_expression_get, _wrap_Player_expression_set},
+    { "uExpressionTimePassed", _wrap_Player_uExpressionTimePassed_get, _wrap_Player_uExpressionTimePassed_set},
+    { "uExpressionTimeLength", _wrap_Player_uExpressionTimeLength_get, _wrap_Player_uExpressionTimeLength_set},
+    { "field_1AA2", _wrap_Player_field_1AA2_get, _wrap_Player_field_1AA2_set},
+    { "_expression21_animtime", _wrap_Player__expression21_animtime_get, _wrap_Player__expression21_animtime_set},
+    { "_expression21_frameset", _wrap_Player__expression21_frameset_get, _wrap_Player__expression21_frameset_set},
+    { "pInstalledBeacons", _wrap_Player_pInstalledBeacons_get, _wrap_Player_pInstalledBeacons_set},
+    { "uNumDivineInterventionCastsThisDay", _wrap_Player_uNumDivineInterventionCastsThisDay_get, _wrap_Player_uNumDivineInterventionCastsThisDay_set},
+    { "uNumArmageddonCasts", _wrap_Player_uNumArmageddonCasts_get, _wrap_Player_uNumArmageddonCasts_set},
+    { "uNumFireSpikeCasts", _wrap_Player_uNumFireSpikeCasts_get, _wrap_Player_uNumFireSpikeCasts_set},
+    { "field_1B3B", _wrap_Player_field_1B3B_get, _wrap_Player_field_1B3B_set},
+    {0,0,0}
+};
+static swig_lua_attribute swig_Player_cls_attributes[] = {
+    {0,0,0}
+};
+static swig_lua_method swig_Player_cls_methods[] = {
+    {0,0}
+};
+static swig_lua_const_info swig_Player_cls_constants[] = {
+    {SWIG_LUA_CONSTTAB_INT("INVETORYSLOTSWIDTH", Player::INVETORYSLOTSWIDTH)},
+    {SWIG_LUA_CONSTTAB_INT("INVETORYSLOTSHEIGHT", Player::INVETORYSLOTSHEIGHT)},
+    {0,0,0,0,0,0}
+};
+static swig_lua_class *swig_Player_bases[] = {0};
+static const char *swig_Player_base_names[] = {0};
+static swig_lua_class _wrap_class_Player = { "Player", &SWIGTYPE_p_Player,_wrap_new_Player, swig_delete_Player, swig_Player_methods, swig_Player_attributes, { "Player", swig_Player_cls_methods, swig_Player_cls_attributes, swig_Player_cls_constants }, swig_Player_bases, swig_Player_base_names };
+
+static int _wrap_pPlayers_set(lua_State* L) {
+  int SWIG_arg = 0;
+  NZIArray< Player *,5 > arg1 ;
+  NZIArray< Player *,5 > *argp1 ;
+  
+  SWIG_check_num_args("pPlayers",1,1)
+  if(!lua_isuserdata(L,1)) SWIG_fail_arg("pPlayers",1,"NZIArray< Player *,5 >");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_NZIArrayT_Player_p_5_t,0))){
+    SWIG_fail_ptr("pPlayers_set",1,SWIGTYPE_p_NZIArrayT_Player_p_5_t);
+  }
+  arg1 = *argp1;
+  
+  pPlayers = arg1;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_pPlayers_get(lua_State* L) {
+  int SWIG_arg = 0;
+  NZIArray< Player *,5 > result;
+  
+  SWIG_check_num_args("pPlayers",0,0)
+  result = pPlayers;
+  {
+    NZIArray< Player *,5 > * resultptr = new NZIArray< Player *,5 >((const NZIArray< Player *,5 > &) result);
+    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_NZIArrayT_Player_p_5_t,1); SWIG_arg++;
+  }
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+static const struct luaL_Reg swig_commands[] = {
+    {0,0}
+};
+
+static swig_lua_var_info swig_variables[] = {
+    { "pPlayers", _wrap_pPlayers_get, _wrap_pPlayers_set },
+    {0,0,0}
+};
+
+static swig_lua_const_info swig_constants[] = {
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_RESIST_AIR", PLAYER_BUFF_RESIST_AIR)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_BLESS", PLAYER_BUFF_BLESS)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_RESIST_BODY", PLAYER_BUFF_RESIST_BODY)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_RESIST_EARTH", PLAYER_BUFF_RESIST_EARTH)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_FATE", PLAYER_BUFF_FATE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_RESIST_FIRE", PLAYER_BUFF_RESIST_FIRE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_HAMMERHANDS", PLAYER_BUFF_HAMMERHANDS)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_HASTE", PLAYER_BUFF_HASTE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_HEROISM", PLAYER_BUFF_HEROISM)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_RESIST_MIND", PLAYER_BUFF_RESIST_MIND)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_PAIN_REFLECTION", PLAYER_BUFF_PAIN_REFLECTION)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_PRESERVATION", PLAYER_BUFF_PRESERVATION)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_REGENERATION", PLAYER_BUFF_REGENERATION)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_SHIELD", PLAYER_BUFF_SHIELD)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_STONESKIN", PLAYER_BUFF_STONESKIN)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_ACCURACY", PLAYER_BUFF_ACCURACY)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_ENDURANCE", PLAYER_BUFF_ENDURANCE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_INTELLIGENCE", PLAYER_BUFF_INTELLIGENCE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_LUCK", PLAYER_BUFF_LUCK)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_STRENGTH", PLAYER_BUFF_STRENGTH)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_WILLPOWER", PLAYER_BUFF_WILLPOWER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_SPEED", PLAYER_BUFF_SPEED)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_RESIST_WATER", PLAYER_BUFF_RESIST_WATER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_BUFF_WATER_WALK", PLAYER_BUFF_WATER_WALK)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_GUILD_BITS__SPIRIT_MEMBERSHIP", 58)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_GUILD_BITS__ARCOMAGE_WIN", 103)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_GUILD_BITS__ARCOMAGE_LOSE", 104)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_1", SPEECH_1)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_2", SPEECH_2)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_3", SPEECH_3)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_4", SPEECH_4)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_5", SPEECH_5)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_6", SPEECH_6)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_7", SPEECH_7)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_8", SPEECH_8)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_9", SPEECH_9)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_10", SPEECH_10)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_11", SPEECH_11)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_12", SPEECH_12)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_14", SPEECH_14)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_NoRoom", SPEECH_NoRoom)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_DO_POTION_FINE", SPEECH_DO_POTION_FINE)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_17", SPEECH_17)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_18", SPEECH_18)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_19", SPEECH_19)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_20", SPEECH_20)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_21", SPEECH_21)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_GoodDay", SPEECH_GoodDay)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_GoodEvening", SPEECH_GoodEvening)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_24", SPEECH_24)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_25", SPEECH_25)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_26", SPEECH_26)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_27", SPEECH_27)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_28", SPEECH_28)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_29", SPEECH_29)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_30", SPEECH_30)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_31", SPEECH_31)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_32", SPEECH_32)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_33", SPEECH_33)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_34", SPEECH_34)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_35", SPEECH_35)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_36", SPEECH_36)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_37", SPEECH_37)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_NotEnoughGold", SPEECH_NotEnoughGold)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_39", SPEECH_39)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_40", SPEECH_40)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_41", SPEECH_41)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_42", SPEECH_42)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_43", SPEECH_43)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_44", SPEECH_44)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_45", SPEECH_45)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_46", SPEECH_46)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_47", SPEECH_47)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_48", SPEECH_48)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_49", SPEECH_49)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_50", SPEECH_50)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_51", SPEECH_51)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_52", SPEECH_52)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_53", SPEECH_53)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_54", SPEECH_54)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_55", SPEECH_55)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_56", SPEECH_56)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_57", SPEECH_57)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_58", SPEECH_58)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_59", SPEECH_59)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_60", SPEECH_60)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_61", SPEECH_61)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_62", SPEECH_62)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_63", SPEECH_63)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_64", SPEECH_64)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_Yell", SPEECH_Yell)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_Falling_scream", SPEECH_Falling_scream)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_67", SPEECH_67)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_68", SPEECH_68)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_69", SPEECH_69)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_70", SPEECH_70)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_CarriageReady", SPEECH_CarriageReady)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_SetSail", SPEECH_SetSail)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_73", SPEECH_73)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_74", SPEECH_74)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_75", SPEECH_75)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_76", SPEECH_76)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_77", SPEECH_77)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_78", SPEECH_78)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_79", SPEECH_79)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_80", SPEECH_80)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_81", SPEECH_81)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_82", SPEECH_82)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_83", SPEECH_83)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_84", SPEECH_84)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_85", SPEECH_85)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_86", SPEECH_86)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_87", SPEECH_87)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_88", SPEECH_88)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_89", SPEECH_89)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_90", SPEECH_90)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_91", SPEECH_91)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_92", SPEECH_92)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_93", SPEECH_93)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_94", SPEECH_94)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_95", SPEECH_95)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_96", SPEECH_96)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_97", SPEECH_97)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_98", SPEECH_98)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_99", SPEECH_99)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_100", SPEECH_100)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_101", SPEECH_101)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_PickMe", SPEECH_PickMe)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_103", SPEECH_103)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_IDENTIFY_MONSTER_WEAKER", SPEECH_IDENTIFY_MONSTER_WEAKER)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_IDENTIFY_MONSTER_STRONGER", SPEECH_IDENTIFY_MONSTER_STRONGER)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_IDENTIFY_MONSTER_106", SPEECH_IDENTIFY_MONSTER_106)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_107", SPEECH_107)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_108", SPEECH_108)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_109", SPEECH_109)},
+    {SWIG_LUA_CONSTTAB_INT("SPEECH_110", SPEECH_110)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_RACE_HUMAN", CHARACTER_RACE_HUMAN)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_RACE_ELF", CHARACTER_RACE_ELF)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_RACE_GOBLIN", CHARACTER_RACE_GOBLIN)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_RACE_DWARF", CHARACTER_RACE_DWARF)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_STRENGTH", CHARACTER_ATTRIBUTE_STRENGTH)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_INTELLIGENCE", CHARACTER_ATTRIBUTE_INTELLIGENCE)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_WILLPOWER", CHARACTER_ATTRIBUTE_WILLPOWER)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_ENDURANCE", CHARACTER_ATTRIBUTE_ENDURANCE)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_ACCURACY", CHARACTER_ATTRIBUTE_ACCURACY)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SPEED", CHARACTER_ATTRIBUTE_SPEED)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_LUCK", CHARACTER_ATTRIBUTE_LUCK)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_HEALTH", CHARACTER_ATTRIBUTE_HEALTH)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_MANA", CHARACTER_ATTRIBUTE_MANA)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_AC_BONUS", CHARACTER_ATTRIBUTE_AC_BONUS)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RESIST_FIRE", CHARACTER_ATTRIBUTE_RESIST_FIRE)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RESIST_AIR", CHARACTER_ATTRIBUTE_RESIST_AIR)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RESIST_WATER", CHARACTER_ATTRIBUTE_RESIST_WATER)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RESIST_EARTH", CHARACTER_ATTRIBUTE_RESIST_EARTH)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RESIST_MIND", CHARACTER_ATTRIBUTE_RESIST_MIND)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RESIST_BODY", CHARACTER_ATTRIBUTE_RESIST_BODY)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_ALCHEMY", CHARACTER_ATTRIBUTE_SKILL_ALCHEMY)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_STEALING", CHARACTER_ATTRIBUTE_SKILL_STEALING)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM", CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_ITEM_ID", CHARACTER_ATTRIBUTE_SKILL_ITEM_ID)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_MONSTER_ID", CHARACTER_ATTRIBUTE_SKILL_MONSTER_ID)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_ARMSMASTER", CHARACTER_ATTRIBUTE_SKILL_ARMSMASTER)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_DODGE", CHARACTER_ATTRIBUTE_SKILL_DODGE)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_UNARMED", CHARACTER_ATTRIBUTE_SKILL_UNARMED)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_LEVEL", CHARACTER_ATTRIBUTE_LEVEL)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_ATTACK", CHARACTER_ATTRIBUTE_ATTACK)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_MELEE_DMG_BONUS", CHARACTER_ATTRIBUTE_MELEE_DMG_BONUS)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_MELEE_DMG_MIN", CHARACTER_ATTRIBUTE_MELEE_DMG_MIN)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_MELEE_DMG_MAX", CHARACTER_ATTRIBUTE_MELEE_DMG_MAX)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RANGED_ATTACK", CHARACTER_ATTRIBUTE_RANGED_ATTACK)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS", CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RANGED_DMG_MIN", CHARACTER_ATTRIBUTE_RANGED_DMG_MIN)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RANGED_DMG_MAX", CHARACTER_ATTRIBUTE_RANGED_DMG_MAX)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_RESIST_SPIRIT", CHARACTER_ATTRIBUTE_RESIST_SPIRIT)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_FIRE", CHARACTER_ATTRIBUTE_SKILL_FIRE)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_AIR", CHARACTER_ATTRIBUTE_SKILL_AIR)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_WATER", CHARACTER_ATTRIBUTE_SKILL_WATER)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_EARTH", CHARACTER_ATTRIBUTE_SKILL_EARTH)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_SPIRIT", CHARACTER_ATTRIBUTE_SKILL_SPIRIT)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_MIND", CHARACTER_ATTRIBUTE_SKILL_MIND)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_BODY", CHARACTER_ATTRIBUTE_SKILL_BODY)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_LIGHT", CHARACTER_ATTRIBUTE_SKILL_LIGHT)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_DARK", CHARACTER_ATTRIBUTE_SKILL_DARK)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_MEDITATION", CHARACTER_ATTRIBUTE_SKILL_MEDITATION)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_BOW", CHARACTER_ATTRIBUTE_SKILL_BOW)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_SHIELD", CHARACTER_ATTRIBUTE_SKILL_SHIELD)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_ATTRIBUTE_SKILL_LEARNING", CHARACTER_ATTRIBUTE_SKILL_LEARNING)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_STAFF", PLAYER_SKILL_STAFF)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_SWORD", PLAYER_SKILL_SWORD)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_DAGGER", PLAYER_SKILL_DAGGER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_AXE", PLAYER_SKILL_AXE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_SPEAR", PLAYER_SKILL_SPEAR)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_BOW", PLAYER_SKILL_BOW)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_MACE", PLAYER_SKILL_MACE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_BLASTER", PLAYER_SKILL_BLASTER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_SHIELD", PLAYER_SKILL_SHIELD)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_LEATHER", PLAYER_SKILL_LEATHER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_CHAIN", PLAYER_SKILL_CHAIN)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_PLATE", PLAYER_SKILL_PLATE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_FIRE", PLAYER_SKILL_FIRE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_AIR", PLAYER_SKILL_AIR)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_WATER", PLAYER_SKILL_WATER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_EARTH", PLAYER_SKILL_EARTH)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_SPIRIT", PLAYER_SKILL_SPIRIT)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_MIND", PLAYER_SKILL_MIND)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_BODY", PLAYER_SKILL_BODY)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_LIGHT", PLAYER_SKILL_LIGHT)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_DARK", PLAYER_SKILL_DARK)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_ITEM_ID", PLAYER_SKILL_ITEM_ID)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_MERCHANT", PLAYER_SKILL_MERCHANT)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_REPAIR", PLAYER_SKILL_REPAIR)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_BODYBUILDING", PLAYER_SKILL_BODYBUILDING)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_MEDITATION", PLAYER_SKILL_MEDITATION)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_PERCEPTION", PLAYER_SKILL_PERCEPTION)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_DIPLOMACY", PLAYER_SKILL_DIPLOMACY)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_TIEVERY", PLAYER_SKILL_TIEVERY)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_TRAP_DISARM", PLAYER_SKILL_TRAP_DISARM)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_DODGE", PLAYER_SKILL_DODGE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_UNARMED", PLAYER_SKILL_UNARMED)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_MONSTER_ID", PLAYER_SKILL_MONSTER_ID)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_ARMSMASTER", PLAYER_SKILL_ARMSMASTER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_STEALING", PLAYER_SKILL_STEALING)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_ALCHEMY", PLAYER_SKILL_ALCHEMY)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_LEARNING", PLAYER_SKILL_LEARNING)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_CLUB", PLAYER_SKILL_CLUB)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_MISC", PLAYER_SKILL_MISC)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_SKILL_INVALID", PLAYER_SKILL_INVALID)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_KNIGHT", PLAYER_CLASS_KNIGHT)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_CHEVALIER", PLAYER_CLASS_CHEVALIER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_CHAMPION", PLAYER_CLASS_CHAMPION)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_BLACK_KNIGHT", PLAYER_CLASS_BLACK_KNIGHT)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_THEIF", PLAYER_CLASS_THEIF)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_ROGUE", PLAYER_CLASS_ROGUE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_SPY", PLAYER_CLASS_SPY)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_ASSASSIN", PLAYER_CLASS_ASSASSIN)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_MONK", PLAYER_CLASS_MONK)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_INITIATE", PLAYER_CLASS_INITIATE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_MASTER", PLAYER_CLASS_MASTER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_NINJA", PLAYER_CLASS_NINJA)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_PALADIN", PLAYER_CLASS_PALADIN)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_CRUSADER", PLAYER_CLASS_CRUSADER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_HERO", PLAYER_CLASS_HERO)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_VILLIAN", PLAYER_CLASS_VILLIAN)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_ARCHER", PLAYER_CLASS_ARCHER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_WARRIOR_MAGE", PLAYER_CLASS_WARRIOR_MAGE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_MASTER_ARCHER", PLAYER_CLASS_MASTER_ARCHER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_SNIPER", PLAYER_CLASS_SNIPER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_RANGER", PLAYER_CLASS_RANGER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_HUNTER", PLAYER_CLASS_HUNTER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_RANGER_LORD", PLAYER_CLASS_RANGER_LORD)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_BOUNTY_HUNTER", PLAYER_CLASS_BOUNTY_HUNTER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_CLERIC", PLAYER_CLASS_CLERIC)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_PRIEST", PLAYER_CLASS_PRIEST)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_PRIEST_OF_SUN", PLAYER_CLASS_PRIEST_OF_SUN)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_PRIEST_OF_MOON", PLAYER_CLASS_PRIEST_OF_MOON)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_DRUID", PLAYER_CLASS_DRUID)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_GREAT_DRUID", PLAYER_CLASS_GREAT_DRUID)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_ARCH_DRUID", PLAYER_CLASS_ARCH_DRUID)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_WARLOCK", PLAYER_CLASS_WARLOCK)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_SORCERER", PLAYER_CLASS_SORCERER)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_WIZARD", PLAYER_CLASS_WIZARD)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_ARCHMAGE", PLAYER_CLASS_ARCHMAGE)},
+    {SWIG_LUA_CONSTTAB_INT("PLAYER_CLASS_LICH", PLAYER_CLASS_LICH)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_INVALID", CHARACTER_EXPRESSION_INVALID)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_1", CHARACTER_EXPRESSION_1)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_CURSED", CHARACTER_EXPRESSION_CURSED)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_WEAK", CHARACTER_EXPRESSION_WEAK)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_SLEEP", CHARACTER_EXPRESSION_SLEEP)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_FEAR", CHARACTER_EXPRESSION_FEAR)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_DRUNK", CHARACTER_EXPRESSION_DRUNK)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_INSANE", CHARACTER_EXPRESSION_INSANE)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_POISONED", CHARACTER_EXPRESSION_POISONED)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_DISEASED", CHARACTER_EXPRESSION_DISEASED)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_PARALYZED", CHARACTER_EXPRESSION_PARALYZED)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_UNCONCIOUS", CHARACTER_EXPRESSION_UNCONCIOUS)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_PERTIFIED", CHARACTER_EXPRESSION_PERTIFIED)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_13", CHARACTER_EXPRESSION_13)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_14", CHARACTER_EXPRESSION_14)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_15", CHARACTER_EXPRESSION_15)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_16", CHARACTER_EXPRESSION_16)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_17", CHARACTER_EXPRESSION_17)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_18", CHARACTER_EXPRESSION_18)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_19", CHARACTER_EXPRESSION_19)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_20", CHARACTER_EXPRESSION_20)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_21", CHARACTER_EXPRESSION_21)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_22", CHARACTER_EXPRESSION_22)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_23", CHARACTER_EXPRESSION_23)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_24", CHARACTER_EXPRESSION_24)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_25", CHARACTER_EXPRESSION_25)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_26", CHARACTER_EXPRESSION_26)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_27", CHARACTER_EXPRESSION_27)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_28", CHARACTER_EXPRESSION_28)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_29", CHARACTER_EXPRESSION_29)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_30", CHARACTER_EXPRESSION_30)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_31", CHARACTER_EXPRESSION_31)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_32", CHARACTER_EXPRESSION_32)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_33", CHARACTER_EXPRESSION_33)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_DMGRECVD_MINOR", CHARACTER_EXPRESSION_DMGRECVD_MINOR)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_DMGRECVD_MODERATE", CHARACTER_EXPRESSION_DMGRECVD_MODERATE)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_DMGRECVD_MAJOR", CHARACTER_EXPRESSION_DMGRECVD_MAJOR)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_37", CHARACTER_EXPRESSION_37)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_38", CHARACTER_EXPRESSION_38)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_39", CHARACTER_EXPRESSION_39)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_SCARED", CHARACTER_EXPRESSION_SCARED)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_54", CHARACTER_EXPRESSION_54)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_55", CHARACTER_EXPRESSION_55)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_56", CHARACTER_EXPRESSION_56)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_57", CHARACTER_EXPRESSION_57)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_FALLING", CHARACTER_EXPRESSION_FALLING)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_DEAD", CHARACTER_EXPRESSION_DEAD)},
+    {SWIG_LUA_CONSTTAB_INT("CHARACTER_EXPRESSION_ERADICATED", CHARACTER_EXPRESSION_ERADICATED)},
+    {SWIG_LUA_CONSTTAB_INT("SEX_MALE", SEX_MALE)},
+    {SWIG_LUA_CONSTTAB_INT("SEX_FEMALE", SEX_FEMALE)},
+    {SWIG_LUA_CONSTTAB_INT("Player_INVETORYSLOTSWIDTH", Player::INVETORYSLOTSWIDTH)},
+    {SWIG_LUA_CONSTTAB_INT("Player_INVETORYSLOTSHEIGHT", Player::INVETORYSLOTSHEIGHT)},
+    {0,0,0,0,0,0}
+};
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
+
+static swig_type_info _swigt__m_PlayerEquipment__unsigned_int = {"_m_PlayerEquipment__unsigned_int", "unsigned int PlayerEquipment::*", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__m_Player__unsigned___int16 = {"_m_Player__unsigned___int16", "unsigned __int16 Player::*", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__m_Player__unsigned_short = {"_m_Player__unsigned_short", "unsigned short Player::*", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_Actor = {"_p_Actor", "Actor *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_DAMAGE_TYPE = {"_p_DAMAGE_TYPE", "DAMAGE_TYPE *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_ITEM_EQUIP_TYPE = {"_p_ITEM_EQUIP_TYPE", "ITEM_EQUIP_TYPE *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_ItemGen = {"_p_ItemGen", "ItemGen *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_LloydBeacon = {"_p_LloydBeacon", "LloydBeacon *", 0, 0, (void*)&_wrap_class_LloydBeacon, 0};
+static swig_type_info _swigt__p_NZIArrayT_Player_p_5_t = {"_p_NZIArrayT_Player_p_5_t", "NZIArray< Player *,5 > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_Player = {"_p_Player", "Player *", 0, 0, (void*)&_wrap_class_Player, 0};
+static swig_type_info _swigt__p_PlayerEquipment = {"_p_PlayerEquipment", "PlayerEquipment *", 0, 0, (void*)&_wrap_class_PlayerEquipment, 0};
+static swig_type_info _swigt__p_PlayerSpellbookChapter = {"_p_PlayerSpellbookChapter", "PlayerSpellbookChapter *", 0, 0, (void*)&_wrap_class_PlayerSpellbookChapter, 0};
+static swig_type_info _swigt__p_PlayerSpells = {"_p_PlayerSpells", "PlayerSpells *", 0, 0, (void*)&_wrap_class_PlayerSpells, 0};
+static swig_type_info _swigt__p___int16 = {"_p___int16", "__int16 *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__arrayT_LloydBeacon_5_t = {"_p_std__arrayT_LloydBeacon_5_t", "std::array< LloydBeacon,5 > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__arrayT_SpellBuff_24_t = {"_p_std__arrayT_SpellBuff_24_t", "std::array< SpellBuff,24 > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__arrayT___int64_20_t = {"_p_std__arrayT___int64_20_t", "std::array< __int64,20 > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__arrayT_char_11_t = {"_p_std__arrayT_char_11_t", "std::array< char,11 > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__arrayT_int_126_t = {"_p_std__arrayT_int_126_t", "std::array< int,126 > *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned___int16 = {"_p_unsigned___int16", "unsigned __int16 *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned___int64 = {"_p_unsigned___int64", "unsigned __int64 *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned___int8 = {"_p_unsigned___int8", "unsigned __int8 *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *", 0, 0, (void*)0, 0};
+
+static swig_type_info *swig_type_initial[] = {
+  &_swigt__m_PlayerEquipment__unsigned_int,
+  &_swigt__m_Player__unsigned___int16,
+  &_swigt__m_Player__unsigned_short,
+  &_swigt__p_Actor,
+  &_swigt__p_DAMAGE_TYPE,
+  &_swigt__p_ITEM_EQUIP_TYPE,
+  &_swigt__p_ItemGen,
+  &_swigt__p_LloydBeacon,
+  &_swigt__p_NZIArrayT_Player_p_5_t,
+  &_swigt__p_Player,
+  &_swigt__p_PlayerEquipment,
+  &_swigt__p_PlayerSpellbookChapter,
+  &_swigt__p_PlayerSpells,
+  &_swigt__p___int16,
+  &_swigt__p_char,
+  &_swigt__p_int,
+  &_swigt__p_std__arrayT_LloydBeacon_5_t,
+  &_swigt__p_std__arrayT_SpellBuff_24_t,
+  &_swigt__p_std__arrayT___int64_20_t,
+  &_swigt__p_std__arrayT_char_11_t,
+  &_swigt__p_std__arrayT_int_126_t,
+  &_swigt__p_unsigned___int16,
+  &_swigt__p_unsigned___int64,
+  &_swigt__p_unsigned___int8,
+  &_swigt__p_unsigned_char,
+};
+
+static swig_cast_info _swigc__m_PlayerEquipment__unsigned_int[] = {  {&_swigt__m_PlayerEquipment__unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__m_Player__unsigned___int16[] = {  {&_swigt__m_Player__unsigned___int16, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__m_Player__unsigned_short[] = {  {&_swigt__m_Player__unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_Actor[] = {  {&_swigt__p_Actor, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_DAMAGE_TYPE[] = {  {&_swigt__p_DAMAGE_TYPE, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_ITEM_EQUIP_TYPE[] = {  {&_swigt__p_ITEM_EQUIP_TYPE, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_ItemGen[] = {  {&_swigt__p_ItemGen, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_LloydBeacon[] = {  {&_swigt__p_LloydBeacon, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_NZIArrayT_Player_p_5_t[] = {  {&_swigt__p_NZIArrayT_Player_p_5_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_Player[] = {  {&_swigt__p_Player, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_PlayerEquipment[] = {  {&_swigt__p_PlayerEquipment, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_PlayerSpellbookChapter[] = {  {&_swigt__p_PlayerSpellbookChapter, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_PlayerSpells[] = {  {&_swigt__p_PlayerSpells, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p___int16[] = {  {&_swigt__p___int16, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__arrayT_LloydBeacon_5_t[] = {  {&_swigt__p_std__arrayT_LloydBeacon_5_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__arrayT_SpellBuff_24_t[] = {  {&_swigt__p_std__arrayT_SpellBuff_24_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__arrayT___int64_20_t[] = {  {&_swigt__p_std__arrayT___int64_20_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__arrayT_char_11_t[] = {  {&_swigt__p_std__arrayT_char_11_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__arrayT_int_126_t[] = {  {&_swigt__p_std__arrayT_int_126_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned___int16[] = {  {&_swigt__p_unsigned___int16, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned___int64[] = {  {&_swigt__p_unsigned___int64, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned___int8[] = {  {&_swigt__p_unsigned___int8, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
+
+static swig_cast_info *swig_cast_initial[] = {
+  _swigc__m_PlayerEquipment__unsigned_int,
+  _swigc__m_Player__unsigned___int16,
+  _swigc__m_Player__unsigned_short,
+  _swigc__p_Actor,
+  _swigc__p_DAMAGE_TYPE,
+  _swigc__p_ITEM_EQUIP_TYPE,
+  _swigc__p_ItemGen,
+  _swigc__p_LloydBeacon,
+  _swigc__p_NZIArrayT_Player_p_5_t,
+  _swigc__p_Player,
+  _swigc__p_PlayerEquipment,
+  _swigc__p_PlayerSpellbookChapter,
+  _swigc__p_PlayerSpells,
+  _swigc__p___int16,
+  _swigc__p_char,
+  _swigc__p_int,
+  _swigc__p_std__arrayT_LloydBeacon_5_t,
+  _swigc__p_std__arrayT_SpellBuff_24_t,
+  _swigc__p_std__arrayT___int64_20_t,
+  _swigc__p_std__arrayT_char_11_t,
+  _swigc__p_std__arrayT_int_126_t,
+  _swigc__p_unsigned___int16,
+  _swigc__p_unsigned___int64,
+  _swigc__p_unsigned___int8,
+  _swigc__p_unsigned_char,
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
+
+/* -----------------------------------------------------------------------------
+ * Type initialization:
+ * This problem is tough by the requirement that no dynamic
+ * memory is used. Also, since swig_type_info structures store pointers to
+ * swig_cast_info structures and swig_cast_info structures store pointers back
+ * to swig_type_info structures, we need some lookup code at initialization.
+ * The idea is that swig generates all the structures that are needed.
+ * The runtime then collects these partially filled structures.
+ * The SWIG_InitializeModule function takes these initial arrays out of
+ * swig_module, and does all the lookup, filling in the swig_module.types
+ * array with the correct data and linking the correct swig_cast_info
+ * structures together.
+ *
+ * The generated swig_type_info structures are assigned staticly to an initial
+ * array. We just loop through that array, and handle each type individually.
+ * First we lookup if this type has been already loaded, and if so, use the
+ * loaded structure instead of the generated one. Then we have to fill in the
+ * cast linked list. The cast data is initially stored in something like a
+ * two-dimensional array. Each row corresponds to a type (there are the same
+ * number of rows as there are in the swig_type_initial array). Each entry in
+ * a column is one of the swig_cast_info structures for that type.
+ * The cast_initial array is actually an array of arrays, because each row has
+ * a variable number of columns. So to actually build the cast linked list,
+ * we find the array of casts associated with the type, and loop through it
+ * adding the casts to the list. The one last trick we need to do is making
+ * sure the type pointer in the swig_cast_info struct is correct.
+ *
+ * First off, we lookup the cast->type name to see if it is already loaded.
+ * There are three cases to handle:
+ *  1) If the cast->type has already been loaded AND the type we are adding
+ *     casting info to has not been loaded (it is in this module), THEN we
+ *     replace the cast->type pointer with the type pointer that has already
+ *     been loaded.
+ *  2) If BOTH types (the one we are adding casting info to, and the
+ *     cast->type) are loaded, THEN the cast info has already been loaded by
+ *     the previous module so we just ignore it.
+ *  3) Finally, if cast->type has not already been loaded, then we add that
+ *     swig_cast_info to the linked list (because the cast->type) pointer will
+ *     be correct.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* c-mode */
+#endif
+#endif
+
+#if 0
+#define SWIGRUNTIME_DEBUG
+#endif
+
+
+SWIGRUNTIME void
+SWIG_InitializeModule(void *clientdata) {
+  size_t i;
+  swig_module_info *module_head, *iter;
+  int found, init;
+
+  /* check to see if the circular list has been setup, if not, set it up */
+  if (swig_module.next==0) {
+    /* Initialize the swig_module */
+    swig_module.type_initial = swig_type_initial;
+    swig_module.cast_initial = swig_cast_initial;
+    swig_module.next = &swig_module;
+    init = 1;
+  } else {
+    init = 0;
+  }
+
+  /* Try and load any already created modules */
+  module_head = SWIG_GetModule(clientdata);
+  if (!module_head) {
+    /* This is the first module loaded for this interpreter */
+    /* so set the swig module into the interpreter */
+    SWIG_SetModule(clientdata, &swig_module);
+    module_head = &swig_module;
+  } else {
+    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
+    found=0;
+    iter=module_head;
+    do {
+      if (iter==&swig_module) {
+        found=1;
+        break;
+      }
+      iter=iter->next;
+    } while (iter!= module_head);
+
+    /* if the is found in the list, then all is done and we may leave */
+    if (found) return;
+    /* otherwise we must add out module into the list */
+    swig_module.next = module_head->next;
+    module_head->next = &swig_module;
+  }
+
+  /* When multiple interpreters are used, a module could have already been initialized in
+     a different interpreter, but not yet have a pointer in this interpreter.
+     In this case, we do not want to continue adding types... everything should be
+     set up already */
+  if (init == 0) return;
+
+  /* Now work on filling in swig_module.types */
+#ifdef SWIGRUNTIME_DEBUG
+  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
+#endif
+  for (i = 0; i < swig_module.size; ++i) {
+    swig_type_info *type = 0;
+    swig_type_info *ret;
+    swig_cast_info *cast;
+
+#ifdef SWIGRUNTIME_DEBUG
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+#endif
+
+    /* if there is another module already loaded */
+    if (swig_module.next != &swig_module) {
+      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
+    }
+    if (type) {
+      /* Overwrite clientdata field */
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: found type %s\n", type->name);
+#endif
+      if (swig_module.type_initial[i]->clientdata) {
+	type->clientdata = swig_module.type_initial[i]->clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
+#endif
+      }
+    } else {
+      type = swig_module.type_initial[i];
+    }
+
+    /* Insert casting types */
+    cast = swig_module.cast_initial[i];
+    while (cast->type) {
+
+      /* Don't need to add information already in the list */
+      ret = 0;
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
+#endif
+      if (swig_module.next != &swig_module) {
+        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
+#ifdef SWIGRUNTIME_DEBUG
+	if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
+#endif
+      }
+      if (ret) {
+	if (type == swig_module.type_initial[i]) {
+#ifdef SWIGRUNTIME_DEBUG
+	  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
+#endif
+	  cast->type = ret;
+	  ret = 0;
+	} else {
+	  /* Check for casting already in the list */
+	  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
+#ifdef SWIGRUNTIME_DEBUG
+	  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
+#endif
+	  if (!ocast) ret = 0;
+	}
+      }
+
+      if (!ret) {
+#ifdef SWIGRUNTIME_DEBUG
+	printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
+#endif
+        if (type->cast) {
+          type->cast->prev = cast;
+          cast->next = type->cast;
+        }
+        type->cast = cast;
+      }
+      cast++;
+    }
+    /* Set entry in modules->types array equal to the type */
+    swig_module.types[i] = type;
+  }
+  swig_module.types[i] = 0;
+
+#ifdef SWIGRUNTIME_DEBUG
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+  for (i = 0; i < swig_module.size; ++i) {
+    int j = 0;
+    swig_cast_info *cast = swig_module.cast_initial[i];
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+    while (cast->type) {
+      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
+      cast++;
+      ++j;
+    }
+  printf("---- Total casts: %d\n",j);
+  }
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+#endif
+}
+
+/* This function will propagate the clientdata field of type to
+* any new swig_type_info structures that have been added into the list
+* of equivalent types.  It is like calling
+* SWIG_TypeClientData(type, clientdata) a second time.
+*/
+SWIGRUNTIME void
+SWIG_PropagateClientData(void) {
+  size_t i;
+  swig_cast_info *equiv;
+  static int init_run = 0;
+
+  if (init_run) return;
+  init_run = 1;
+
+  for (i = 0; i < swig_module.size; i++) {
+    if (swig_module.types[i]->clientdata) {
+      equiv = swig_module.types[i]->cast;
+      while (equiv) {
+        if (!equiv->converter) {
+          if (equiv->type && !equiv->type->clientdata)
+            SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
+        }
+        equiv = equiv->next;
+      }
+    }
+  }
+}
+
+#ifdef __cplusplus
+#if 0
+{ /* c-mode */
+#endif
+}
+#endif
+
+
+
+/* Forward declaration of where the user's %init{} gets inserted */
+void SWIG_init_user(lua_State* L );
+    
+#ifdef __cplusplus
+extern "C" {
+#endif
+/* this is the initialization function
+  added at the very end of the code
+  the function is always called SWIG_init, but an earlier #define will rename it
+*/
+#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
+LUALIB_API int SWIG_init(lua_State* L)
+#else
+SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
+#endif
+{
+#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
+  int i;
+  /* start with global table */
+  lua_pushglobaltable (L);
+  /* SWIG's internal initalisation */
+  SWIG_InitializeModule((void*)L);
+  SWIG_PropagateClientData();
+#endif
+
+#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
+  /* add a global fn */
+  SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
+  SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
+  /* begin the module (its a table with the same name as the module) */
+  SWIG_Lua_module_begin(L,SWIG_name);
+  /* add commands/functions */
+  for (i = 0; swig_commands[i].name; i++){
+    SWIG_Lua_module_add_function(L,swig_commands[i].name,swig_commands[i].func);
+  }
+  /* add variables */
+  for (i = 0; swig_variables[i].name; i++){
+    SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
+  }
+#endif
+
+#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
+  /* set up base class pointers (the hierarchy) */
+  for (i = 0; swig_types[i]; i++){
+    if (swig_types[i]->clientdata){
+      SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
+    }
+  }
+  /* additional registration structs & classes in lua */
+  for (i = 0; swig_types[i]; i++){
+    if (swig_types[i]->clientdata){
+      SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
+    }
+  }
+#endif
+
+#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
+  /* constants */
+  SWIG_Lua_InstallConstants(L,swig_constants);
+#endif
+
+#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
+  /* invoke user-specific initialization */
+  SWIG_init_user(L);
+  /* end module */
+  /* Note: We do not clean up the stack here (Lua will do this for us). At this
+     point, we have the globals table and out module table on the stack. Returning
+     one value makes the module table the result of the require command. */
+  return 1;
+#else
+  return 0;
+#endif
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+
+const char* SWIG_LUACODE=
+  "";
+
+void SWIG_init_user(lua_State* L)
+{
+  /* exec Lua code if applicable */
+  SWIG_Lua_dostring(L,SWIG_LUACODE);
+}
+
--- a/Render.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/Render.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -8273,19 +8273,19 @@
   const char *v8; // [sp-4h] [bp-28h]@33
   struct tagRECT Rect; // [sp+14h] [bp-10h]@15
 
-  if ( !pRenderer->bWindowMode && (dword_6BE364_game_settings_1 & 2) )
+  /*if ( !pRenderer->bWindowMode && (dword_6BE364_game_settings_1 & 2) )
   {
     ModalWindow(pGlobalTXT_LocalizationStrings[62], UIMSG_0);// "Might and Magic VII requires your desktop to be in 16bit (32k or 65k) Color mode in order to operate in a window."
     return;
-  }
+  }*/
   if ( pRenderer->bWindowMode || !pRenderer->pRenderD3D || pRenderer->pRenderD3D->pAvailableDevices->bIsDeviceCompatible )
   {
     if ( pEventTimer->bPaused )
-      BYTE1(dword_6BE364_game_settings_1) |= 8u;
+      dword_6BE364_game_settings_1 |= GAME_SETTINGS_0800;
     else
       pEventTimer->Pause();
     if ( pMiscTimer->bPaused )
-      BYTE1(dword_6BE364_game_settings_1) |= 0x10u;
+      dword_6BE364_game_settings_1 |= GAME_SETTINGS_1000;
     else
       pMiscTimer->Pause();
     pMouse->bActive = 0;
@@ -8370,18 +8370,16 @@
     pMouse->bActive = true;
     if ( pVideoPlayer->AnyMovieLoaded() )
       pVideoPlayer->SelectMovieType();
-    if (dword_6BE364_game_settings_1 & 0x0800 )
-      BYTE1(dword_6BE364_game_settings_1) &= 0xF7u;
+    if (dword_6BE364_game_settings_1 & GAME_SETTINGS_0800)
+      dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_0800;
     else
       pEventTimer->Resume();
-    if ( BYTE1(dword_6BE364_game_settings_1) & 0x10 )
-      BYTE1(dword_6BE364_game_settings_1) &= 0xEFu;
+    if (dword_6BE364_game_settings_1 & GAME_SETTINGS_1000)
+      dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_1000;
     else
       pMiscTimer->Resume();
   }
 }
-// 6BE364: using guessed type int dword_6BE364_game_settings_1;
-// A74C88: using guessed type int dword_A74C88;
 
 
 //----- (004524D8) --------------------------------------------------------
--- a/SaveLoad.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/SaveLoad.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -213,7 +213,7 @@
     Error("Unable to find: %s!", header.pLocationName);
 
   strcpy(pCurrentMapName, header.pLocationName);
-  dword_6BE364_game_settings_1 |= 0x2001;
+  dword_6BE364_game_settings_1 |= GAME_SETTINGS_2000 | GAME_SETTINGS_0001;
 
   for (uint i = 0; i < uNumSavegameFiles; ++i)
     pSavegameThumbnails[i].Release();
--- a/TurnEngine.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/TurnEngine.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -728,7 +728,7 @@
                          {
                            case  AIState::AttackingMelee:
                              v19 = pActors[v4].special_ability_use_check(v4);
-                             stru_50FE08.Add( v28->uPackedID,  5120,  v5->vPosition.x, v5->vPosition.y, v5->vPosition.z + ((signed int)v5->uActorHeight >> 1), v19,  1);
+                             AttackerInfo.Add( v28->uPackedID,  5120,  v5->vPosition.x, v5->vPosition.y, v5->vPosition.z + ((signed int)v5->uActorHeight >> 1), v19,  1);
                              Actor::AI_Stand(v4, a2a, 0, &a4);
                              break;
                            case AIState::AttackingRanged1:
@@ -768,7 +768,7 @@
         }
         
     }
-// 50FE08: using guessed type stru298 stru_50FE08;
+// 50FE08: using guessed type stru298 AttackerInfo;
 
 //----- (0040680F) --------------------------------------------------------
 void stru262_TurnBased::AI_Action_( int queue_index )
--- a/UI/UIHouses.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/UI/UIHouses.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -1544,7 +1544,7 @@
           SaveGame(1, 0);
           strcpy(pCurrentMapName, pMapStats->pInfos[pTravel->uMapInfoID].pFilename);
 
-          dword_6BE364_game_settings_1 |= 1u;
+          dword_6BE364_game_settings_1 |= GAME_SETTINGS_0001;
           _5B65B8_npcdata_hiword_house_or_other = 0;
           dword_5B65BC = 0;
           _5B65B4_npcdata_loword_house_or_other = pTravel->arrival_rot_y;
@@ -2282,13 +2282,13 @@
       return;
     }
     Party::TakeGold(pPrice);
-    v35 = LODWORD(pPlayers[uActiveCharacter]->pConditions[17]);
+    v35 = LODWORD(pPlayers[uActiveCharacter]->pConditions[Condition_Zombie]);
     memset(pPlayers[uActiveCharacter], 0, 0xA0u);
     pPlayers[uActiveCharacter]->sHealth = pPlayers[uActiveCharacter]->GetMaxHealth();
     pPlayers[uActiveCharacter]->sMana = pPlayers[uActiveCharacter]->GetMaxMana();
     if ( (signed int)window_SpeakInHouse->ptr_1C != 78 && ((signed int)window_SpeakInHouse->ptr_1C <= 80 || (signed int)window_SpeakInHouse->ptr_1C > 82) )
     {
-      if ( (unsigned int)pPlayers[uActiveCharacter]->pConditions[17] | v35 )
+      if ( (unsigned int)pPlayers[uActiveCharacter]->pConditions[Condition_Zombie] | v35 )
       {
         pPlayers[uActiveCharacter]->uCurrentFace = pPlayers[uActiveCharacter]->uPrevFace;
         pPlayers[uActiveCharacter]->uVoiceID = pPlayers[uActiveCharacter]->uPrevVoiceID;
@@ -2300,14 +2300,14 @@
       pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
       return;
     }
-    if ( (unsigned int)pPlayers[uActiveCharacter]->pConditions[17] | v35 )
+    if ( (unsigned int)pPlayers[uActiveCharacter]->pConditions[Condition_Zombie] | v35 )
     {
-      LODWORD(pPlayers[uActiveCharacter]->pConditions[17]) = v35;
+      LODWORD(pPlayers[uActiveCharacter]->pConditions[Condition_Zombie]) = v35;
     }
     else
     {
-      if ( !pPlayers[uActiveCharacter]->pConditions[16]
-        && !pPlayers[uActiveCharacter]->pConditions[15] && !pPlayers[uActiveCharacter]->pConditions[14] )
+      if ( !pPlayers[uActiveCharacter]->pConditions[Condition_Eradicated]
+        && !pPlayers[uActiveCharacter]->pConditions[Condition_Pertified] && !pPlayers[uActiveCharacter]->pConditions[Condition_Dead] )
       {
         pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0);
         pPlayers[uActiveCharacter]->PlaySound(SPEECH_82, 0);
@@ -2321,11 +2321,11 @@
       pPlayers[uActiveCharacter]->uVoiceID = (pPlayers[uActiveCharacter]->GetSexByVoice() != 0) + 23;
       pPlayers[uActiveCharacter]->uCurrentFace = (pPlayers[uActiveCharacter]->GetSexByVoice() != 0) + 23;
       ReloadPlayerPortraits(uActiveCharacter - 1, (pPlayers[uActiveCharacter]->GetSexByVoice() != 0) + 23);
-      LODWORD(pPlayers[uActiveCharacter]->pConditions[17]) = LODWORD(pParty->uTimePlayed);
+      LODWORD(pPlayers[uActiveCharacter]->pConditions[Condition_Zombie]) = LODWORD(pParty->uTimePlayed);
       //v39 = (GUIWindow *)HIDWORD(pParty->uTimePlayed);
     }
-    //HIDWORD(pPlayers[uActiveCharacter]->pConditions[17]) = (int)v39;
-    pPlayers[uActiveCharacter]->pConditions[17] =pParty->uTimePlayed;
+    //HIDWORD(pPlayers[uActiveCharacter]->pConditions[Condition_Zombie]) = (int)v39;
+    pPlayers[uActiveCharacter]->pConditions[Condition_Zombie] =pParty->uTimePlayed;
     pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0);
     pPlayers[uActiveCharacter]->PlaySound(SPEECH_82, 0);
     pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536);
--- a/UI/UIMainMenu.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/UI/UIMainMenu.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -270,7 +270,7 @@
       TranslateMessage(&Msg);
       DispatchMessageA(&Msg);
     }
-    if ( BYTE1(dword_6BE364_game_settings_1) & 1 )
+    if (dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE)
     {
       WaitMessage();
     }
@@ -302,50 +302,3 @@
   cred_texture.Release();
   return MENU_MAIN;     // return MENU_Main
 }
-/*MENU_STATE MainMenuUI_Credits_Loop()//NewTitle
-{
-  MSG Msg;
-  GUIWindow credit_window;
-  RGBTexture mm6title_texture;
-
-  if ( pMessageQueue_50CBD0->uNumMessages )
-    pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
-  ++pIcons_LOD->uTexturePacksCount;
-  if ( !pIcons_LOD->uNumPrevLoadedFiles )
-    pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
-
-  //pAudioPlayer->PlayMusicTrack(MUSIC_Credits);
-
-  mm6title_texture.Load("newtitle.pcx", 0);
-  pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_Escape, 0, 27, "", 0);
-  pCurrentScreen = SCREEN_CREATORS;
-  SetCurrentMenuID(MENU_CREDITSPROC);
-
-  do
-  {
-    while ( PeekMessageA(&Msg, 0, 0, 0, 1) )
-    {
-      if ( Msg.message == 18 )
-        Game_DeinitializeAndTerminate(0);
-      TranslateMessage(&Msg);
-      DispatchMessageA(&Msg);
-    }
-    if ( BYTE1(dword_6BE364_game_settings_1) & 1 )
-    {
-      WaitMessage();
-    }
-    else
-    {
-      pRenderer->BeginScene();
-      pRenderer->DrawTextureRGB(0, 0, &mm6title_texture);
-      pRenderer->EndScene();
-      pRenderer->Present();
-      pCurrentScreen = SCREEN_GAME;
-      GUI_MainMenuMessageProc();
-    }
-  }
-  while ( GetCurrentMenuID() == MENU_CREDITSPROC );
-  //pAudioPlayer->_4AA258(1);
-  mm6title_texture.Release();
-  return MENU_MAIN;     // return MENU_Main
-}*/
\ No newline at end of file
--- a/UI/UIPartyCreation.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/UI/UIPartyCreation.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -583,7 +583,7 @@
       TranslateMessage(&Msg);
       DispatchMessageA(&Msg);
     }
-    if ( BYTE1(dword_6BE364_game_settings_1) & 1 )
+    if (dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE)
     {
       WaitMessage();
     }
--- a/UI/UIPopup.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/UI/UIPopup.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -467,6 +467,9 @@
 
   bool monster_full_informations = false;
   static Actor pMonsterInfoUI_Doll;
+  if ( !uActiveCharacter ) //
+    uActiveCharacter = 1;
+
   /*if ( !(bMonsterInfoUI_bDollInitialized & 1) )
   {
     bMonsterInfoUI_bDollInitialized |= 1u;
--- a/VideoPlayer.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/VideoPlayer.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -362,7 +362,7 @@
 
   v4 = a2;
   pName = pMovieName;
-  if ( !(dword_6BE364_game_settings_1 & 0x44) )
+  if ( !(dword_6BE364_game_settings_1 & (GAME_SETTINGS_NO_HOUSE_ANIM | GAME_SETTINGS_NO_INTRO)) )
   {
     if ( a2 == 2 )
       v4 = 0;
--- a/_deleted.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/_deleted.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -13629,7 +13629,7 @@
     case WM_ACTIVATEAPP:
       if ( wParam && (GetForegroundWindow() == hWnd || GetForegroundWindow() == hInsertCDWindow) )
       {
-        if ( BYTE1(dword_6BE364_game_settings_1) & 1 )
+        if (dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE)
         {
           dword_4E98BC_bApplicationActive = 1;
           if ( pRenderer->bWindowMode )
@@ -13641,7 +13641,7 @@
             if (bitsPerPixel != 16 || planes != 1)
               Error(pGlobalTXT_LocalizationStrings[62]);
           }
-          BYTE1(dword_6BE364_game_settings_1) &= 0xFEu;
+          dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_APP_INACTIVE;
 
           if ( pArcomageGame->bGameInProgress )
           {
@@ -13649,12 +13649,12 @@
           }
           else
           {
-            if ( BYTE1(dword_6BE364_game_settings_1) & 2 )
-              BYTE1(dword_6BE364_game_settings_1) &= 0xFDu;
+            if (dword_6BE364_game_settings_1 & GAME_SETTINGS_0200_EVENT_TIMER)
+              dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_0200_EVENT_TIMER;
             else
               pEventTimer->Resume();
-            if ( BYTE1(dword_6BE364_game_settings_1) & 4 )
-              BYTE1(dword_6BE364_game_settings_1) &= 0xFBu;
+            if (dword_6BE364_game_settings_1 & GAME_SETTINGS_0400_MISC_TIMER)
+              dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_0400_MISC_TIMER;
             else
               pMiscTimer->Resume();
 
@@ -13672,7 +13672,7 @@
       }
       else
       {
-        if (!(dword_6BE364_game_settings_1 & 0x100))
+        if (!(dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE))
         {
           dword_4E98BC_bApplicationActive = 0;
           if ( (pVideoPlayer->pSmackerMovie || pVideoPlayer->pBinkMovie) && pVideoPlayer->bPlayingMovie )
@@ -13682,13 +13682,13 @@
           if (pRenderer->uAcquiredDirect3DDevice == 1)
             SetWindowPos(hWnd, (HWND)0xFFFFFFFE, 0, 0, 0, 0, 0x18u);
           ClipCursor(0);
-          dword_6BE364_game_settings_1 |= 0x100u;
+          dword_6BE364_game_settings_1 |= GAME_SETTINGS_APP_INACTIVE;
           if ( pEventTimer->bPaused )
-            BYTE1(dword_6BE364_game_settings_1) |= 2u;
+            dword_6BE364_game_settings_1 |= GAME_SETTINGS_0200_EVENT_TIMER;
           else
             pEventTimer->Pause();
           if ( pMiscTimer->bPaused )
-            BYTE1(dword_6BE364_game_settings_1) |= 4u;
+            dword_6BE364_game_settings_1 |= GAME_SETTINGS_0400_MISC_TIMER;
           else
             pMiscTimer->Pause();
 
--- a/lib/swig.bat	Tue Dec 03 09:22:24 2013 +0600
+++ b/lib/swig.bat	Tue Dec 03 09:22:28 2013 +0600
@@ -1,4 +1,3 @@
-@echo off
 rem echo 1 %1
 rem echo 2 %2
 rem echo 3 %3
@@ -6,6 +5,8 @@
 rem echo 5 %5
 rem echo 6 %6
 
+set WOMM_SWIG_SOLUTION_DIR=%CD%
+
 rem echo xcopy %4 "../../lib/swig/swigwin-2.0.11" /y
 xcopy %4 "../../lib/swig/swigwin-2.0.11" /y
 
@@ -13,4 +14,7 @@
 swig -c++ -lua %3
 
 rem echo xcopy "%6" %5"%2" /y
-xcopy "%6" %5"%2" /y
\ No newline at end of file
+xcopy "%6" %5"%2" /y
+
+rem echo chdir /d %WOMM_SWIG_SOLUTION_DIR%
+chdir /d %WOMM_SWIG_SOLUTION_DIR%
\ No newline at end of file
--- a/mm7_2.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/mm7_2.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -695,7 +695,7 @@
 }
 
 //----- (004BF91E) --------------------------------------------------------
-unsigned int  GameOverMenu(void *ecx0)
+unsigned int GameOverMenu(void *ecx0)
 {
   const char *v1; // eax@2
   unsigned int result; // eax@3
@@ -725,7 +725,7 @@
   RGBTexture _this; // [sp+Ch] [bp-C4h]@1
   //RGBTexture::RGBTexture(&this);
 
-  BYTE1(dword_6BE364_game_settings_1) &= 0xBFu;
+  dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_4000;
   bGameoverLoop = 1;
   pVideoPlayer->bStopBeforeSchedule = 0;
   pAudioPlayer->StopChannels(-1, -1);
@@ -810,7 +810,7 @@
   pWindow.DrawTitleText(pFont, 1u, pWindow.uFrameHeight - 2 * LOBYTE(pFont->uFontHeight) - 5, 1u, pTmpBuf.data(), 3u);
   sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[94], v23);
   pWindow.DrawTitleText(pFont, 1u, pWindow.uFrameHeight, 1u, pTmpBuf.data(), 3u);
-  BYTE1(dword_6BE364_game_settings_1) |= 0x40u;
+  dword_6BE364_game_settings_1 |= GAME_SETTINGS_4000;
   pRenderer->EndScene();
   pRenderer->Present();
   if ( pRenderer->pRenderD3D )
@@ -2982,9 +2982,9 @@
 
   pGameLoadingUI_ProgressBar->Progress();
 
-  if ( dword_6BE368_debug_settings_2 & 4 )
+  if (dword_6BE368_debug_settings_2 & DEBUG_SETTINGS_NO_ACTORS)
     uNumActors = 0;
-  if ( dword_6BE368_debug_settings_2 & 8 )
+  if ( dword_6BE368_debug_settings_2 & DEBUG_SETTINGS_NO_DECORATIONS)
     uNumLevelDecorations = 0;
   init_event_triggers();
 
@@ -3068,19 +3068,20 @@
       pWindow = pGUIWindow_CurrentMenu;
     }
 
-    for (MSG msg; PeekMessage(&msg, 0, 0, 0, PM_REMOVE);)
+    for (MSG msg; PeekMessageW(&msg, 0, 0, 0, PM_REMOVE);)
     {
       if (msg.message == WM_QUIT)
         Game_DeinitializeAndTerminate(0);
       TranslateMessage(&msg);
-      DispatchMessage(&msg);
+      DispatchMessageW(&msg);
     }
-    if (dword_6BE364_game_settings_1 & 0x0100)
+
+    if (dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE)
     {
       WaitMessage();
+      continue;
     }
-    else
-    {
+
       pRenderer->BeginScene();
       pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX);
 
@@ -3136,7 +3137,6 @@
       }
       pRenderer->EndScene();
       pRenderer->Present();
-    }
   }
   GUI_MainMenuMessageProc();
   pRenderer->BeginScene();
@@ -3987,7 +3987,7 @@
 
 
   
-  if (dword_6BE364_game_settings_1 & 2 || !(dword_6BE368_debug_settings_2 & 1))// 
+  if (dword_6BE364_game_settings_1 & 2 || !(dword_6BE368_debug_settings_2 & DEBUG_SETTINGS_RUN_IN_WIDOW))// 
                                                 //   color depth != 16
                                                 // or
                                                 //   not in window
@@ -4034,7 +4034,7 @@
   pVideoPlayer = new VideoPlayer();
   pVideoPlayer->Initialize(window);
 
-  dword_6BE364_game_settings_1 |= 0x4000;
+  dword_6BE364_game_settings_1 |= GAME_SETTINGS_4000;
 
     switch ( uTurnSpeed )
     {
@@ -4324,10 +4324,10 @@
   bool bNoMargareth = false;
   if (pCmdLine && *pCmdLine)
   {
-    if (wcsstr(pCmdLine, L"-usedefs"))
-      bDebugResouces = 1;
+    //if (wcsstr(pCmdLine, L"-usedefs"))
+    //  bDebugResouces = 1;
     if (wcsstr(pCmdLine, L"-window"))
-      dword_6BE368_debug_settings_2 |= 1u;
+      dword_6BE368_debug_settings_2 |= DEBUG_SETTINGS_RUN_IN_WIDOW;
 
     if (wcsstr(pCmdLine, L"-nointro"))
       bNoIntro = true;//dword_6BE364_game_settings_1 |= 4;
@@ -4341,7 +4341,7 @@
       bWalkSound = false;//dword_6BE364_game_settings_1 |= 0x20;
     if (wcsstr(pCmdLine, L"-novideo"))
     {
-      dword_6BE364_game_settings_1 |= 0x40;
+      dword_6BE364_game_settings_1 |= GAME_SETTINGS_NO_HOUSE_ANIM;
       bNoVideo = true;
     }
     if (wcsstr(pCmdLine, L"-nocd"))
@@ -4375,7 +4375,7 @@
     SetUserInterface(PartyAlignment_Neutral, false);
     ShowIntroVideo_and_LoadingScreen();
     WriteWindowsRegistryInt("Ran once", 1);
-    dword_6BE364_game_settings_1 |= 0x4000;
+    dword_6BE364_game_settings_1 |= GAME_SETTINGS_4000;
     pGame->InitializeGammaController();
     SecondaryInitialization();
     pRenderer->SetRasterClipRect(0, 0, 639, 479);
@@ -4543,19 +4543,19 @@
 
 
   if (GetPrivateProfileIntW(L"debug", L"nomonster", 0, pIniFilename))
-    dword_6BE368_debug_settings_2 |= 4;
+    dword_6BE368_debug_settings_2 |= DEBUG_SETTINGS_NO_ACTORS;
   if (bUseRegistry)
     v1 = ReadWindowsRegistryInt("startinwindow", 0);
   else
     v1 = GetPrivateProfileIntW(L"debug", L"startinwindow", 0, pIniFilename);
   if (v1)
-    dword_6BE368_debug_settings_2 |= 1;
+    dword_6BE368_debug_settings_2 |= DEBUG_SETTINGS_RUN_IN_WIDOW;
   if (GetPrivateProfileIntW(L"debug", L"showFR", 0, pIniFilename))
-    dword_6BE368_debug_settings_2 |= 2;
+    dword_6BE368_debug_settings_2 |= DEBUG_SETTINGS_0002_SHOW_FR;
   if (GetPrivateProfileIntW(L"debug", L"nodamage", 0, pIniFilename))
-    dword_6BE368_debug_settings_2 |= 0x10;
+    dword_6BE368_debug_settings_2 |= DEBUG_SETTINGS_NO_DAMAGE;
   if (GetPrivateProfileIntW(L"debug", L"nodecoration", 0, pIniFilename))
-    dword_6BE368_debug_settings_2 |= 8;
+    dword_6BE368_debug_settings_2 |= DEBUG_SETTINGS_NO_DECORATIONS;
 
   wchar_t pStartingMapNameW[1024];
   GetPrivateProfileStringW(L"file", L"startmap", L"out01.odm", pStartingMapNameW, 0x20u, pIniFilename);
@@ -4990,19 +4990,18 @@
 //----- (0046BDC0) --------------------------------------------------------
 void  UpdateUserInput_and_MapSpecificStuff()
 {
-  if ( dword_6BE364_game_settings_1 & 0x80 )
+  if (dword_6BE364_game_settings_1 & GAME_SETTINGS_0080_SKIP_USER_INPUT_THIS_FRAME)
   {
-    LOBYTE(dword_6BE364_game_settings_1) = dword_6BE364_game_settings_1 & 0x7F;
+    dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_0080_SKIP_USER_INPUT_THIS_FRAME;
+    return;
   }
-  else
-  {
+
     if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
       BLV_UpdateUserInputAndOther();
     else if (uCurrentlyLoadedLevelType == LEVEL_Outdoor)
         ODM_UpdateUserInputAndOther();
 
     area_of_effect__damage_evaluate();
-  }
 }
 
 //----- (0046BFFA) --------------------------------------------------------
@@ -5232,7 +5231,7 @@
                   pSpriteObjects[uLayingItemID].vVelocity.x = v32;
                   pSpriteObjects[uLayingItemID].vVelocity.y = v32;
                   pSpriteObjects[uLayingItemID].vVelocity.z = v32;
-                  stru_50FE08.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
+                  AttackerInfo.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
                   if (v3->uFlags & OBJECT_DESC_TRIAL_PARTICLE)
                     trail_particle_generator.GenerateTrailParticles(pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v3->uParticleTrailColor);
                   if ( pSpriteObjects[uLayingItemID].uSoundID == (short)v32 )
@@ -5254,7 +5253,7 @@
               pSpriteObjects[uLayingItemID].vVelocity.x = v32;
               pSpriteObjects[uLayingItemID].vVelocity.y = v32;
               pSpriteObjects[uLayingItemID].vVelocity.z = v32;
-              stru_50FE08.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
+              AttackerInfo.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
               if (v3->uFlags & OBJECT_DESC_TRIAL_PARTICLE)
                 trail_particle_generator.GenerateTrailParticles(pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v3->uParticleTrailColor);
               if ( pSpriteObjects[uLayingItemID].uSoundID == (short)v32 )
@@ -5275,7 +5274,7 @@
             pSpriteObjects[uLayingItemID].vVelocity.x = v32;
             pSpriteObjects[uLayingItemID].vVelocity.y = v32;
             pSpriteObjects[uLayingItemID].vVelocity.z = v32;
-            stru_50FE08.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
+            AttackerInfo.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
             if (v3->uFlags & OBJECT_DESC_TRIAL_PARTICLE)
               trail_particle_generator.GenerateTrailParticles(pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v3->uParticleTrailColor);
             if ( pSpriteObjects[uLayingItemID].uSoundID == (short)v32 )
@@ -5621,7 +5620,7 @@
         pSpriteObjects[uLayingItemID].vVelocity.y = v66;
         pSpriteObjects[uLayingItemID].vVelocity.x = v66;
         pSpriteObjects[uLayingItemID].uSpriteFrameID = v66;
-        stru_50FE08.Add(PID(OBJECT_Item,v72), 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v132, v134);
+        AttackerInfo.Add(PID(OBJECT_Item,v72), 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v132, v134);
         if ( pSpriteObjects[uLayingItemID].uSoundID == (short)v66 )
           v78 = 0;
         else
@@ -5722,7 +5721,7 @@
         pSpriteObjects[uLayingItemID].vVelocity.y = v66;
         pSpriteObjects[uLayingItemID].vVelocity.x = v66;
         pSpriteObjects[uLayingItemID].uSpriteFrameID = v66;
-        stru_50FE08.Add(PID(OBJECT_Item,v72), 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v132, v134);
+        AttackerInfo.Add(PID(OBJECT_Item,v72), 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v132, v134);
         if ( pSpriteObjects[uLayingItemID].uSoundID == (short)v66 )
           v78 = 0;
         else
@@ -5971,7 +5970,7 @@
     v40 = pSpriteObjects[uLayingItemID].vPosition.x;
     pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
     v147 = v38;
-    stru_50FE08.Add(v38, 512, v40, v39, v37, 0, 0);
+    AttackerInfo.Add(v38, 512, v40, v39, v37, 0, 0);
     if (v3->uFlags & OBJECT_DESC_TRIAL_PARTICLE)
       trail_particle_generator.GenerateTrailParticles(pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v3->uParticleTrailColor);
     pAudioPlayer->PlaySound(SOUND_8, v147, 0, -1, 0, 0, 0, 0);
@@ -6016,7 +6015,7 @@
             pSpriteObjects[uLayingItemID].vVelocity.x = v32;
             pSpriteObjects[uLayingItemID].vVelocity.y = v32;
             pSpriteObjects[uLayingItemID].vVelocity.z = v32;
-            stru_50FE08.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
+            AttackerInfo.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
             if (v3->uFlags & OBJECT_DESC_TRIAL_PARTICLE)
               trail_particle_generator.GenerateTrailParticles(pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v3->uParticleTrailColor);
             if ( pSpriteObjects[uLayingItemID].uSoundID == (short)v32 )
@@ -6039,7 +6038,7 @@
         pSpriteObjects[uLayingItemID].vVelocity.x = v32;
         pSpriteObjects[uLayingItemID].vVelocity.y = v32;
         pSpriteObjects[uLayingItemID].vVelocity.z = v32;
-        stru_50FE08.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
+        AttackerInfo.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
         if (v3->uFlags & OBJECT_DESC_TRIAL_PARTICLE)
           trail_particle_generator.GenerateTrailParticles(pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v3->uParticleTrailColor);
         if ( pSpriteObjects[uLayingItemID].uSoundID == (short)v32 )
@@ -6061,7 +6060,7 @@
       pSpriteObjects[uLayingItemID].vVelocity.x = v32;
       pSpriteObjects[uLayingItemID].vVelocity.y = v32;
       pSpriteObjects[uLayingItemID].vVelocity.z = v32;
-      stru_50FE08.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
+      AttackerInfo.Add(v102, 512, pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v100, v32);
       if (v3->uFlags & OBJECT_DESC_TRIAL_PARTICLE)
         trail_particle_generator.GenerateTrailParticles(pSpriteObjects[uLayingItemID].vPosition.x, pSpriteObjects[uLayingItemID].vPosition.y, pSpriteObjects[uLayingItemID].vPosition.z, v3->uParticleTrailColor);
       if ( pSpriteObjects[uLayingItemID].uSoundID == (short)v32 )
--- a/mm7_3.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/mm7_3.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -3820,12 +3820,12 @@
     (unsigned int)(signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375) / 0x3C / 0x3C / 0x18 + 1,
     v3,
     (int)&thisa);
-  if ( !(BYTE1(dword_6BE364_game_settings_1) & 0x20) )
+  if ( !(dword_6BE364_game_settings_1 & GAME_SETTINGS_2000) )
   {
     InitializeActors();
     InitializeSpriteObjects();
   }
-  BYTE1(dword_6BE364_game_settings_1) &= 0xDFu;
+  dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_2000;
   //v5 = 0;
   if ( !v2 )
     thisa = 0;
@@ -3853,7 +3853,7 @@
     RespawnGlobalDecorations();
   }
   pOutdoor->PrepareDecorations();
-  pOutdoor->_47F223_LooksLikeGenerateMonsterLoot();
+  pOutdoor->ArrangeSpriteObjects();
   pOutdoor->InitalizeActors(v2);
   pOutdoor->MessWithLUN();
   v7 = strlen("levels\\");
--- a/mm7_4.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/mm7_4.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -324,12 +324,10 @@
 // 4ED498: using guessed type char byte_4ED498;
 
 //----- (00493938) --------------------------------------------------------
-int  _493938_regenerate()
+void  _493938_regenerate()
 {
-  int v0; // edi@1
-  signed __int64 v1; // qax@1
-  int v2; // ecx@1
-  int result; // eax@1
+  int current_time; // edi@1
+  int last_reg_time; // qax@1
   int v4; // eax@2
   int v5; // edi@5
   bool cursed_flag; // ecx@5
@@ -343,50 +341,33 @@
   unsigned int *v14; // esi@21
   unsigned int v15; // ecx@21
   unsigned int v16; // eax@21
-  int v17; // edx@21
   int v18; // eax@21
   signed int v19; // eax@21
-  signed int v20; // ebx@25
-  Player *v21; // esi@25
+  bool recovery_HP; // ebx@25
   ITEM_EQUIP_TYPE v22; // edi@30
-  //int v23; // edx@31
-  signed int v24; // ecx@32
   signed int v25; // eax@33
   int v26; // eax@35
   int v27; // eax@36
   int v28; // eax@37
-  int v29; // eax@40
-  int v30; // eax@41
   signed int v31; // ecx@53
-  char *v32; // eax@53
-  char *v33; // edi@82
-  int v34; // ecx@88
-  int v35; // eax@88
-  char *v36; // edi@99
-  int v37; // edi@104
-  int v38; // edi@106
-  int v39; // edi@111
-  int v40; // ecx@113
   char v41[400]; // [sp+4h] [bp-22Ch]@20
   SpriteObject a1; // [sp+194h] [bp-9Ch]@15
   Vec3_int_ a3; // [sp+204h] [bp-2Ch]@15
-  int v44; // [sp+210h] [bp-20h]@22
-  int v45; // [sp+214h] [bp-1Ch]@25
-  int v46; // [sp+218h] [bp-18h]@25
-  int v47; // [sp+21Ch] [bp-14h]@25
-  int v48; // [sp+220h] [bp-10h]@25
+  bool has_dragon_flag; // [sp+210h] [bp-20h]@22
+  bool lich_jar_flag; // [sp+214h] [bp-1Ch]@25
+  bool zombie_flag; // [sp+218h] [bp-18h]@25
+  bool decrease_HP; // [sp+21Ch] [bp-14h]@25
+  bool lich_flag; // [sp+220h] [bp-10h]@25
   int v49; // [sp+224h] [bp-Ch]@24
-  int v50; // [sp+228h] [bp-8h]@25
-  int v51; // [sp+22Ch] [bp-4h]@2
+  bool recovery_SP; // [sp+228h] [bp-8h]@25
+  bool redraw_flag; // [sp+22Ch] [bp-4h]@2
 
-  v0 = (signed int)(signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375) / 60;
-  v1 = (signed __int64)((double)pParty->uLastRegenerationTime * 0.234375);
-  v2 = (signed int)v1 / 60;
-  result = (signed int)v1 / 60 + 5;
-  if ( v0 >= result )
+  current_time = (signed int)(signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375) / 60;
+  last_reg_time = (signed int)(signed __int64)((double)pParty->uLastRegenerationTime * 0.234375) / 60;
+  if ( current_time >= (signed int)last_reg_time + 5 )
   {
-    v51 = 0;
-    v4 = (v0 - v2) / 5;
+    redraw_flag = false;
+    v4 = (current_time - last_reg_time) / 5;
     if (pParty->FlyActive())
     {
       if ( pParty->bFlying )
@@ -394,14 +375,14 @@
         if ( !(pParty->pPartyBuffs[PARTY_BUFF_FLY].uFlags & 1) )
         {
           v5 = v4 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uPower;
-          cursed_flag = pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster - 1].pConditions[0];//cursed
+          cursed_flag = pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster - 1].pConditions[Condition_Cursed];//cursed
           v7 = cursed_flag < v5;
           //cursed_flag -= v5;
           if ( !v7 )
           {
             pParty->uFlags &= 0xFFFFFFBFu;
             pParty->bFlying = false;
-            v51 = 1;
+            redraw_flag = true;
           }
         }
       }
@@ -413,24 +394,21 @@
       {
         if ( !(pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags & 1) )
         { // taking on water
-          //__debugbreak();
-          v8 = (int *)&pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster - 1].pConditions[0];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster + 2000];
+          v8 = (int *)&pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster - 1].pConditions[Condition_Cursed];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster + 2000];
           v7 = *v8 < v4;
           *v8 -= v4;
           if ( v7 )
           {
             *v8 = 0;
             pParty->uFlags &= ~PARTY_FLAGS_1_STANDING_ON_WATER;
-            v51 = 1;
+            redraw_flag = true;
           }
         }
       }
     }
 
-    if (pParty->ImmolationActive())
+    if (pParty->ImmolationActive())//
     {
-      //SpriteObject::SpriteObject(&a1);
-      v9 = 0;
       a3.z = 0;
       a3.y = 0;
       a3.x = 0;
@@ -467,249 +445,177 @@
       a1.uFacing = 0;
       a1.uSoundID = 0;
       v13 = _46A89E_immolation_effect((int)v41, 100, 307);
-      if ( v13 > 0 )
+      for ( v9 = 0; v9 < v13; ++v9 )
       {
-        do
-        {
-          v14 = (unsigned int *)&v41[4 * v9];
-          v15 = *v14;
-          v16 = *v14;
-          a1.vPosition.x = pActors[v16].vPosition.x;
-          v17 = pActors[v16].vPosition.y;
-          a1.vPosition.z = pActors[v16].vPosition.z;
-          v18 = 8 * v15;
-          LOBYTE(v18) = PID(OBJECT_Actor,v15);
-          a1.vPosition.y = v17;
-          a1.spell_target_pid = v18;
-          v19 = a1.Create(0, 0, 0, 0);
-          DamageMonsterFromParty(PID(OBJECT_Item,v19), *v14, &a3);
-          ++v9;
-        }
-        while ( v9 < v13 );
+        v14 = (unsigned int *)&v41[4 * v9];
+        v15 = *v14;
+        v16 = *v14;
+        a1.vPosition.x = pActors[v16].vPosition.x;
+        a1.vPosition.y = pActors[v16].vPosition.y;
+        a1.vPosition.z = pActors[v16].vPosition.z;
+        v18 = 8 * v15;
+        LOBYTE(v18) = PID(OBJECT_Actor,v15);
+        a1.spell_target_pid = v18;
+        v19 = a1.Create(0, 0, 0, 0);
+        DamageMonsterFromParty(PID(OBJECT_Item,v19), *v14, &a3);
       }
     }
-    v44 = 0;
+
+    has_dragon_flag = false;
     if (PartyHasDragon())
-      v44 = 1;
-    v49 = 0;
-LABEL_25:
-    v20 = 0;
-    v21 = &pParty->pPlayers[v49];
-    v50 = 0;
-    v47 = 0;
-    v45 = 0;
-    v48 = 0;
-    v46 = 0;
-    if ( v44 && v21->classType == PLAYER_CLASS_WARLOCK )
-      v50 = 1;
-    if ( v21->classType == PLAYER_CLASS_LICH )
-      v48 = 1;
-    v22 = (ITEM_EQUIP_TYPE)0;
-    while ( 1 )
+      has_dragon_flag = true;
+
+    for ( v49 = 0; v49 < 4; v49++ )
     {
-      if ( v21->HasItemEquipped(v22) )
+      recovery_HP = false;
+      recovery_SP = false;
+      decrease_HP = false;
+      lich_flag = false;
+      lich_jar_flag = false;
+      zombie_flag = false;
+
+      for ( int v22 = 0; (signed int)v22 < 16; v22++ )
       {
-        //v23 = v21->pEquipment.pIndices;
-        uint _idx = v21->pEquipment.pIndices[v22];
-        v24 = v21->pInventoryItemList[_idx].uItemID;
-        if ( v24 > 134 )
+        if ( pParty->pPlayers[v49].HasItemEquipped((ITEM_EQUIP_TYPE)v22) )
         {
-          if ( v24 == 529 )
+          uint _idx = pParty->pPlayers[v49].pEquipment.pIndices[v22];
+          if ( pParty->pPlayers[v49].pInventoryItemList[_idx - 1].uItemID > 134 )
           {
-            v20 = 1;
-            v50 = 1;
-            goto LABEL_51;
-          }
-          if ( v24 == 535 )
-          {
-            v20 = 1;
-            goto LABEL_51;
-          }
-          if ( v24 == 515 )
-          {
-            v47 = 1;
+            if ( pParty->pPlayers[v49].pInventoryItemList[_idx - 1].uItemID == ITEM_RELIC_ETHRICS_STAFF )
+              decrease_HP = true;
+            if ( pParty->pPlayers[v49].pInventoryItemList[_idx - 1].uItemID == ITEM_ARTIFACT_HERMES_SANDALS )
+            {
+              recovery_HP = true;
+              recovery_SP = true;
+            }
+            if ( pParty->pPlayers[v49].pInventoryItemList[_idx - 1].uItemID == ITEM_ARTIFACT_MINDS_EYE )
+              recovery_SP = true;
+            if ( pParty->pPlayers[v49].pInventoryItemList[_idx - 1].uItemID == ITEM_ARTIFACT_HEROS_BELT )
+              recovery_HP = true;
           }
           else
           {
-            if ( v24 == 532 )
+            v25 = pParty->pPlayers[v49].pInventoryItemList[_idx - 1].uSpecEnchantmentType;
+            if ( v25 == 37 //of Regeneration("Regenerate 1hp/x while walking, etc")
+              && v25 == 44 //of Life("HP (+10), Regen hpts")
+              && v25 == 50 //of The Phoenix("Fire Res (+30), Regen hpts") && 
+              && v25 == 54 )// of The Troll("End (+15), Regen hpts")
+               recovery_HP = true;
+            if ( v25 == 38 //of Mana("Regenerate 1sp/x while walking, etc")
+              && v25 == 47 //of The Eclipse("SP (+10), Regen spts")
+              && v25 == 55 )//of The Unicorn("Luck (+15), Regen spts")
+               recovery_SP = true;
+            if ( v25 == 66 )// of Plenty("Regenerate 1 hp/x and 1 sp/x while walking, etc.")
             {
-              v50 = 1;
-              goto LABEL_51;
+              recovery_HP = true;
+              recovery_SP = true;
             }
           }
-        }
-        else
-        {
-          v25 = v21->pInventoryItemList[_idx].uSpecEnchantmentType;
-          if ( v25 <= 50 )
+
+          if ( recovery_HP && !pParty->pPlayers[v49].pConditions[Condition_Dead]
+                           && !pParty->pPlayers[v49].pConditions[Condition_Eradicated] )
+          {
+            ++pParty->pPlayers[v49].sHealth;
+            if ( pParty->pPlayers[v49].sHealth > pParty->pPlayers[v49].GetMaxHealth() )
+              pParty->pPlayers[v49].sHealth = pParty->pPlayers[v49].GetMaxHealth();
+            if ( pParty->pPlayers[v49].pConditions[Condition_Unconcious] && pParty->pPlayers[v49].sHealth > 0 )
+              pParty->pPlayers[v49].pConditions[Condition_Unconcious] = 0;
+            redraw_flag = true;
+          }
+
+          if ( recovery_SP )
           {
-            if ( v25 != 50 )
+            ++pParty->pPlayers[v49].sMana;
+            if ( pParty->pPlayers[v49].sMana > pParty->pPlayers[v49].GetMaxMana() )
+              pParty->pPlayers[v49].sMana = pParty->pPlayers[v49].GetMaxMana();
+            redraw_flag = true;
+          }
+
+          if ( decrease_HP && !pParty->pPlayers[v49].pConditions[Condition_Dead]
+                   && !pParty->pPlayers[v49].pConditions[Condition_Eradicated] )
+          {
+            --pParty->pPlayers[v49].sHealth;
+            if ( !(pParty->pPlayers[v49].pConditions[Condition_Unconcious]) && pParty->pPlayers[v49].sHealth < 0 )
+              pParty->pPlayers[v49].pConditions[Condition_Unconcious] = pParty->uTimePlayed;
+            if ( pParty->pPlayers[v49].sHealth < 1 )
             {
-              v26 = v25 - 37;
-              if ( v26 )
+              if ( pParty->pPlayers[v49].sHealth + pParty->pPlayers[v49].uEndurance + pParty->pPlayers[v49].GetItemsBonus(CHARACTER_ATTRIBUTE_ENDURANCE) >= 1
+                || (signed __int64)pParty->pPlayers[v49].pPlayerBuffs[PLAYER_BUFF_PRESERVATION].uExpireTime > 0 )
+                 pParty->pPlayers[v49].pConditions[Condition_Unconcious] = pParty->uTimePlayed;
+              else
               {
-                v27 = v26 - 1;
-                if ( !v27 )
-                {
-                  v50 = 1;
-                  goto LABEL_51;
-                }
-                v28 = v27 - 6;
-                if ( v28 )
-                {
-                  if ( v28 != 3 )
-                    goto LABEL_51;
-//LABEL_50:
-                  v50 = 1;
-                  goto LABEL_51;
-                }
+                if ( !pParty->pPlayers[v49].pConditions[Condition_Dead] )
+                  pParty->pPlayers[v49].pConditions[Condition_Dead] = pParty->uTimePlayed;
               }
             }
-//LABEL_44:
-            v20 = 1;
-            goto LABEL_51;
-          }
-          v29 = v25 - 54;
-          if ( !v29 )
-          {
-            v20 = 1;
-            goto LABEL_51;
-          }
-          v30 = v29 - 1;
-          if ( !v30 )
-          {
-            v50 = 1;
-            goto LABEL_51;
-          }
-          if ( v30 == 11 )
-          {
-//LABEL_43:
-            v20 = 1;
-            v50 = 1;
-            goto LABEL_51;
+            redraw_flag = true;
           }
         }
       }
-LABEL_51:
-      v22 = (ITEM_EQUIP_TYPE)((int)v22 + 1);
-      if ( (signed int)v22 >= 16 )
+
+      //regeneration
+      if ( pParty->pPlayers[v49].pPlayerBuffs[PLAYER_BUFF_REGENERATION].uExpireTime > 0
+        && !pParty->pPlayers[v49].pConditions[Condition_Dead]
+        && !pParty->pPlayers[v49].pConditions[Condition_Eradicated] )
       {
-        if ( v48 )
-        {
-          v31 = 0;
-          v32 = (char *)v21->pInventoryItemList.data();
-          while ( *(int *)v32 != 601 || (unsigned __int8)v32[26] != v49 + 1 )
-          {
-            ++v31;
-            v32 += 36;
-            if ( v31 >= 138 )
-              goto LABEL_59;
-          }
-          v48 = 0;
-          v45 = 1;
-        }
-LABEL_59:
-        if ( v21->pConditions[17] )
-          v46 = 1;
-        if ( v20 && !v21->pConditions[14] && !v21->pConditions[16] )
-        {
-          ++v21->sHealth;
-          if ( v21->sHealth > v21->GetMaxHealth() )
-            v21->sHealth = v21->GetMaxHealth();
-          if ( v21->pConditions[13] && v21->sHealth > 0 )
-          {
-            LODWORD(v21->pConditions[13]) = 0;
-            HIDWORD(v21->pConditions[13]) = 0;
-          }
-          v51 = 1;
-        }
-        if ( SHIDWORD(v21->pPlayerBuffs[12].uExpireTime) >= 0
-          && (SHIDWORD(v21->pPlayerBuffs[12].uExpireTime) > 0 || LODWORD(v21->pPlayerBuffs[12].uExpireTime))
-          && !v21->pConditions[14]
-          && !v21->pConditions[16] )
-        {
-          v21->sHealth += 5 * v21->pPlayerBuffs[12].uPower;
-          if ( v21->sHealth > v21->GetMaxHealth() )
-            v21->sHealth = v21->GetMaxHealth();
-          if ( v21->pConditions[13] && v21->sHealth > 0 )
-          {
-            LODWORD(v21->pConditions[13]) = 0;
-            HIDWORD(v21->pConditions[13]) = 0;
-          }
-          v51 = 1;
-        }
-        if ( v50 )
-        {
-          v33 = (char *)&v21->sMana;
-          ++*(int *)v33;
-          if ( v21->sMana > v21->GetMaxMana() )
-            *(int *)v33 = v21->GetMaxMana();
-          v51 = 1;
-        }
-        if ( v47 && !v21->pConditions[14] && !v21->pConditions[16] )
+        pParty->pPlayers[v49].sHealth += 5 * pParty->pPlayers[v49].pPlayerBuffs[PLAYER_BUFF_REGENERATION].uPower;
+        if ( pParty->pPlayers[v49].sHealth > pParty->pPlayers[v49].GetMaxHealth() )
+          pParty->pPlayers[v49].sHealth = pParty->pPlayers[v49].GetMaxHealth();
+        if ( pParty->pPlayers[v49].pConditions[Condition_Unconcious] && pParty->pPlayers[v49].sHealth > 0 )
+          pParty->pPlayers[v49].pConditions[Condition_Unconcious] = 0;
+        redraw_flag = true;
+      }
+
+      //for warlock
+      if ( has_dragon_flag && pParty->pPlayers[v49].classType == PLAYER_CLASS_WARLOCK )
+      {
+        ++pParty->pPlayers[v49].sMana;
+        if ( pParty->pPlayers[v49].sMana > pParty->pPlayers[v49].GetMaxMana() )
+          pParty->pPlayers[v49].sMana = pParty->pPlayers[v49].GetMaxMana();
+        redraw_flag = true;
+      }
+
+      //for lich
+      if ( pParty->pPlayers[v49].classType == PLAYER_CLASS_LICH )
+      {
+        for ( v31 = 0; v31 < 138; ++v31 )
         {
-          v34 = LODWORD(v21->pConditions[13]);
-          --v21->sHealth;
-          v35 = v21->sHealth;
-          if ( !(HIDWORD(v21->pConditions[13]) | v34) && v35 < 0 )
-            v21->pConditions[13] = pParty->uTimePlayed;
-          if ( v35 < 1 )
-          {
-            if ( v21->sHealth + v21->uEndurance + v21->GetItemsBonus(CHARACTER_ATTRIBUTE_ENDURANCE) >= 1
-              || (signed __int64)v21->pPlayerBuffs[11].uExpireTime > 0 )
-            {
-              v21->pConditions[13] = pParty->uTimePlayed;
-            }
-            else
-            {
-              if ( !v21->pConditions[14] )
-                v21->pConditions[14] = pParty->uTimePlayed;
-            }
-          }
-          v51 = 1;
-        }
-        if ( v45 )
-        {
-          v36 = (char *)&v21->sMana;
-          ++*(int *)v36;
-          if ( v21->sMana > v21->GetMaxMana() )
-            *(int *)v36 = v21->GetMaxMana();
+          if ( pParty->pPlayers[v49].pInventoryItemList[v31].uItemID == ITEM_LICH_JAR_FULL )
+            lich_jar_flag = true;
         }
-        if ( v48 && !v21->pConditions[14] && !v21->pConditions[16] )
-        {
-          v37 = v21->sHealth;
-          if ( v37 > v21->GetMaxHealth() / 2 )
-            v21->sHealth = v37 - 2;
-          v38 = v21->sMana;
-          if ( v38 > v21->GetMaxMana() / 2 )
-            v21->sMana = v38 - 2;
-        }
-        if ( v46 && !v21->pConditions[14] && !v21->pConditions[16] )
-        {
-          v39 = v21->sHealth;
-          if ( v39 > v21->GetMaxHealth() / 2 )
-            v21->sHealth = v39 - 1;
-          v40 = v21->sMana;
-          if ( v40 > 0 )
-            v21->sMana = v40 - 1;
-        }
-        ++v49;
-        if ( v49 >= 4 )
-        {
-          result = HIDWORD(pParty->uTimePlayed);
-          pParty->uLastRegenerationTime = pParty->uTimePlayed;
-          if ( !viewparams->bRedrawGameUI )
-          {
-            result = v51;
-            viewparams->bRedrawGameUI = v51;
-          }
-          return result;
-        }
-        goto LABEL_25;
+        lich_flag = true;
+      }
+      if ( lich_flag && !pParty->pPlayers[v49].pConditions[Condition_Dead]
+                     && !pParty->pPlayers[v49].pConditions[Condition_Eradicated] )
+      {
+        if ( pParty->pPlayers[v49].sHealth > pParty->pPlayers[v49].GetMaxHealth() / 2 )
+          pParty->pPlayers[v49].sHealth = pParty->pPlayers[v49].sHealth - 2;
+        if ( pParty->pPlayers[v49].sMana > pParty->pPlayers[v49].GetMaxMana() / 2 )
+          pParty->pPlayers[v49].sMana = pParty->pPlayers[v49].sMana - 2;
+      }
+      if ( lich_jar_flag )
+      {
+        ++pParty->pPlayers[v49].sMana;
+       if ( pParty->pPlayers[v49].sMana > pParty->pPlayers[v49].GetMaxMana() )
+          pParty->pPlayers[v49].sMana = pParty->pPlayers[v49].GetMaxMana();
+      }
+
+      //for zombie
+      if ( pParty->pPlayers[v49].pConditions[Condition_Zombie] )
+        zombie_flag = true;
+      if ( zombie_flag && !pParty->pPlayers[v49].pConditions[Condition_Dead]
+                       && !pParty->pPlayers[v49].pConditions[Condition_Eradicated] )
+      {
+        if ( pParty->pPlayers[v49].sHealth > pParty->pPlayers[v49].GetMaxHealth() / 2 )
+          pParty->pPlayers[v49].sHealth = pParty->pPlayers[v49].sHealth - 1;
+        if ( pParty->pPlayers[v49].sMana > 0 )
+          pParty->pPlayers[v49].sMana = pParty->pPlayers[v49].sMana - 1;
       }
     }
+    pParty->uLastRegenerationTime = pParty->uTimePlayed;
+    if ( !viewparams->bRedrawGameUI )
+      viewparams->bRedrawGameUI = redraw_flag;
   }
-  return result;
 }
 
 //----- (00493F79) --------------------------------------------------------
@@ -739,90 +645,41 @@
 void _494035_timed_effects__water_walking_damage__etc()
 {
   signed __int64 v0; // qax@1
-  signed __int64 v1; // ST30_8@1
-  signed __int64 v2; // ST38_8@1
-  unsigned __int64 v3; // qax@1
   unsigned int v4; // edi@1
-  //signed int v5; // eax@4
-  //char *v6; // ecx@5
-  //Player *v7; // esi@8
-  //char *v8; // ecx@12
-  //Player *pPlayer; // esi@15
-  //void *v10; // esi@25
-  unsigned int v11; // ecx@27
   signed int v12; // edi@29
-  //Player *v13; // ecx@30
-  //Player *v14; // esi@35
-  //double v15; // st7@35
-  Player **v16; // esi@43
-  Player *v17; // edi@44
-  double v18; // st7@44
-  //float v19; // ST28_4@48
-  //double v20; // ST38_8@48
-  Player *v21; // esi@51
-  signed int v22; // edi@53
-  int v23; // eax@59
   int v24; // ecx@60
-  int v25; // eax@63
   int v26; // ecx@64
-  int v27; // eax@67
   int v28; // ecx@68
-  int v29; // eax@71
   int v30; // ecx@72
-  int v31; // eax@75
   int v32; // ecx@76
-  int v33; // eax@79
   int v34; // ecx@80
-  int v35; // eax@83
   int v36; // ecx@84
-  int v37; // eax@87
   int v38; // ecx@88
-  int v39; // eax@91
   int v40; // ecx@92
-  int v41; // eax@95
   int v42; // ecx@96
   bool v43; // ebx@102
-  //SpellBuff *v44; // edi@104
-  //signed int v45; // ebp@104
   bool v46; // edi@111
-  //SpellBuff *v47; // esi@113
-  //Player **v48; // esi@119
-  //signed int v49; // edi@121
-  //char *v50; // esi@122
-  signed int v51; // edx@128
-  signed int v52; // ecx@130
-  int v53; // eax@131
-  Player *v54; // eax@141
-  //unsigned int v55; // [sp-8h] [bp-38h]@18
   unsigned int v56; // [sp-8h] [bp-38h]@55
-  //int v57; // [sp-4h] [bp-34h]@18
-  //int v58; // [sp-4h] [bp-34h]@33
   int v59; // [sp-4h] [bp-34h]@55
-  //unsigned int v60; // [sp+10h] [bp-20h]@1
   unsigned int v61; // [sp+14h] [bp-1Ch]@1
-  Player **v62; // [sp+14h] [bp-1Ch]@50
-  //unsigned int a2; // [sp+18h] [bp-18h]@1
   signed int a2a; // [sp+18h] [bp-18h]@47
-  signed int v65; // [sp+1Ch] [bp-14h]@47
+  signed int old_day; // [sp+1Ch] [bp-14h]@47
+  signed int old_hour;
 
-  //a2 = pParty->uCurrentHour;
-  v61 = pParty->uDaysPlayed;
+  old_day = pParty->uDaysPlayed;
+  old_hour = pParty->uCurrentHour;
   //auto prev_time = pEventTimer->uTimeElapsed;
   pParty->uTimePlayed += pEventTimer->uTimeElapsed;
-  v0 = (signed __int64)(pParty->uTimePlayed * 0.234375) / 60;
-  v1 = v0;
-  v0 /= 60i64;
-  v2 = v0;
-  v3 = (unsigned int)v0 / 24;
-  v4 = (unsigned int)(v3 / 7) >> 2;
+  v0 = ((signed __int64)(pParty->uTimePlayed * 0.234375) / 60)/60i64;
+  v4 = (unsigned int)(((unsigned int)v0 / 24) / 7) >> 2;
   pParty->uCurrentTimeSecond = (signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375) % 60;
-  pParty->uCurrentMinute = v1 % 60;
-  pParty->uCurrentMonthWeek = v3 / 7 & 3;
-  pParty->uCurrentHour = v2 % 24;
-  pParty->uDaysPlayed = (unsigned int)v3 % 28;
+  pParty->uCurrentMinute = ((signed __int64)(pParty->uTimePlayed * 0.234375) / 60) % 60;
+  pParty->uCurrentHour = v0 % 24;
+  pParty->uCurrentMonthWeek = ((unsigned int)v0 / 24) / 7 & 3;
+  pParty->uDaysPlayed = (unsigned int)((unsigned int)v0 / 24) % 28;
   pParty->uCurrentMonth = v4 % 12;
   pParty->uCurrentYear = v4 / 0xC + game_starting_year;
-  if ( pParty->uCurrentHour >= 3 && (pParty->uCurrentHour < 3 || pParty->uDaysPlayed > v61) ) // new day dawns
+  if ( pParty->uCurrentHour >= 3 && (old_hour < 3 || pParty->uDaysPlayed > old_day) ) // new day dawns
   {
     pParty->pHirelings[0].bHasUsedTheAbility = false;
     pParty->pHirelings[1].bHasUsedTheAbility = false;
@@ -843,20 +700,18 @@
           pParty->pPlayers[i].sHealth = pParty->pPlayers[i].sHealth / (pParty->days_played_without_rest + 1) + 1;
 
       if (pParty->days_played_without_rest > 3)
-        for (uint i = 0; i < 4; ++i)
+      for ( uint i = 0; i < 4; ++i )
+      {
+        pParty->pPlayers[i].Zero();
+        if (!pParty->pPlayers[i].IsPertified() && !pParty->pPlayers[i].IsEradicated()
+         && !pParty->pPlayers[i].IsDead())
         {
-          Player* player = &pParty->pPlayers[i];
-
-          player->Zero();
-
-          if (!player->IsPertified() && !player->IsEradicated() && !player->IsDead())
-          {
-            if (rand() % 100 < 5 * pParty->days_played_without_rest)
-              player->SetCondDeadWithBlockCheck(0);
-            if (rand() % 100 < 10 * pParty->days_played_without_rest)
-              player->SetCondInsaneWithBlockCheck(0);
-          }
+          if (rand() % 100 < 5 * pParty->days_played_without_rest)
+            pParty->pPlayers[i].SetCondDeadWithBlockCheck(0);
+          if (rand() % 100 < 10 * pParty->days_played_without_rest)
+            pParty->pPlayers[i].SetCondInsaneWithBlockCheck(0);
         }
+      }
     }
     if (uCurrentlyLoadedLevelType == LEVEL_Outdoor)
       pOutdoor->SetFog();
@@ -865,259 +720,198 @@
       pParty->pPlayers[i].uNumDivineInterventionCastsThisDay = 0;
   }
 
-  v11 = LODWORD(pParty->uTimePlayed);
-  if ( pParty->uFlags & 4 && pParty->field_6FC < (signed __int64)pParty->uTimePlayed )//water damage error
+  if ( pParty->uFlags & 4 && pParty->field_6FC < (signed __int64)pParty->uTimePlayed )//water damage
   {
-    //v12 = 1;
-    pParty->field_6FC = LODWORD(pParty->uTimePlayed) + 128;
-    viewparams->bRedrawGameUI = 1;
-    //while ( 1 )
-    for ( v12 = 1; v12 <= 4; ++v12 )
+    pParty->field_6FC = (signed __int64)pParty->uTimePlayed + 128;
+    viewparams->bRedrawGameUI = true;
+    for ( uint pl = 1; pl <= 4; ++pl )
     {
-      if ( pPlayers[v12]->WearsItem(ITEM_RELIC_HARECS_LEATHER, EQUIP_ARMOUR)
-        || pPlayers[v12]->HasEnchantedItemEquipped(71)
-        || pPlayers[v12]->pPlayerBuffs[23].uExpireTime > 0 )
-      {
-        //v58 = 0;
-        pPlayers[v12]->PlayEmotion(CHARACTER_EXPRESSION_37, 0);
-      }
+      if ( pPlayers[pl]->WearsItem(ITEM_RELIC_HARECS_LEATHER, EQUIP_ARMOUR)
+        || pPlayers[pl]->HasEnchantedItemEquipped(71)
+        || pPlayers[pl]->pPlayerBuffs[PLAYER_BUFF_WATER_WALK].uExpireTime > 0 )
+         pPlayers[pl]->PlayEmotion(CHARACTER_EXPRESSION_37, 0);
       else
       {
-        //v58 = 0;
-        if ( !pPlayers[v12]->HasUnderwaterSuitEquipped() )
+        if ( !pPlayers[pl]->HasUnderwaterSuitEquipped() )
         {
-          //v14 = pPlayers[v12];
-          //v15 = (double)pPlayers[v12]->GetMaxHealth() * 0.1;
-          pPlayers[v12]->ReceiveDamage((signed __int64)pPlayers[v12]->GetMaxHealth() * 0.1, DMGT_FIRE);
+          pPlayers[pl]->ReceiveDamage((signed __int64)pPlayers[pl]->GetMaxHealth() * 0.1, DMGT_FIRE);
           if ( pParty->uFlags & 4 )
           {
-            strcpy(GameUI_Footer_TimedString.data(), pGlobalTXT_LocalizationStrings[660]);
+            strcpy(GameUI_Footer_TimedString.data(), pGlobalTXT_LocalizationStrings[660]);//  !
             GameUI_Footer_TimeLeft = 128;
           }
         }
-		else
-			pPlayers[v12]->PlayEmotion(CHARACTER_EXPRESSION_37, 0);
-      }
-      //++v12;
-      //if ( v12 > 4 )
-      //{
-        //v11 = LODWORD(pParty->uTimePlayed);
-        //break;
+        else
+          pPlayers[pl]->PlayEmotion(CHARACTER_EXPRESSION_37, 0);
       }
-      v11 = LODWORD(pParty->uTimePlayed);
-    //}
+    }
   }
-  if ( pParty->uFlags & 0x200 && pParty->field_6FC < (signed __int64)__PAIR__(HIDWORD(pParty->uTimePlayed), v11) )
+  if ( pParty->uFlags & 0x200 && pParty->field_6FC < (signed __int64)pParty->uTimePlayed ) //lava damage
   {
-    viewparams->bRedrawGameUI = 1;
-    pParty->field_6FC = v11 + 128;
-    v16 = &pPlayers[1];
-    do
+    viewparams->bRedrawGameUI = true;
+    pParty->field_6FC = (signed __int64)pParty->uTimePlayed + 128;
+    
+    for ( uint pl = 1; pl <= 4; pl++ )
     {
-      v17 = *v16;
-      v18 = (double)(*v16)->GetMaxHealth() * 0.1;
-      v17->ReceiveDamage((signed __int64)v18, DMGT_FIRE);
+      pPlayers[pl]->ReceiveDamage((signed __int64)pPlayers[pl]->GetMaxHealth() * 0.1, DMGT_FIRE);
       if ( pParty->uFlags & 0x200 )
       {
-        strcpy(GameUI_Footer_TimedString.data(), pGlobalTXT_LocalizationStrings[661]);
+        strcpy(GameUI_Footer_TimedString.data(), pGlobalTXT_LocalizationStrings[661]); // !
         GameUI_Footer_TimeLeft = 128;
       }
-      ++v16;
     }
-    while ( (signed int)v16 <= (signed int)&pPlayers[4] );
   }
   _493938_regenerate();
-  v65 = 4;
+  uint party_condition_flag = 4;
   a2a = pEventTimer->uTimeElapsed;
-  if ( pParty->uFlags2 & PARTY_FLAGS_2_RUNNING )
+  if ( pParty->uFlags2 & PARTY_FLAGS_2_RUNNING )//   
   {
-    //v19 = (double)(signed int)prev_time * 0.5;
-    //v20 = v19 + 6.7553994e15;
     a2a *= 0.5f;
     if (a2a < 1)
       a2a = 1;
   }
-  v62 = &pPlayers[1];
-  do
+  
+  for ( uint pl = 1; pl <= 4; pl++ )
   {
-    v21 = *v62;
-    if ( (*v62)->uTimeToRecovery )
-      v21->Recover(a2a);
-    v22 = v21->sHealth;
-    if ( v21->GetItemsBonus(CHARACTER_ATTRIBUTE_ENDURANCE) + v22 + v21->uEndurance >= 1
-      || (signed __int64)v21->pPlayerBuffs[11].uExpireTime > 0 )
+    if ( pPlayers[pl]->uTimeToRecovery )
+      pPlayers[pl]->Recover(a2a);// 
+    if ( pPlayers[pl]->GetItemsBonus(CHARACTER_ATTRIBUTE_ENDURANCE) + pPlayers[pl]->sHealth + pPlayers[pl]->uEndurance >= 1
+      || (signed __int64)pPlayers[pl]->pPlayerBuffs[PLAYER_BUFF_PRESERVATION].uExpireTime > 0 )
     {
-      if ( v22 < 1 )
-	  {
-		  v59 = 0;
-		  v56 = 13;
-		  v21->SetCondition(v56, v59);
-	  }
+      if ( pPlayers[pl]->sHealth < 1 )
+        pPlayers[pl]->SetCondition(Condition_Unconcious, 0);
     }
     else
+      pPlayers[pl]->SetCondition(Condition_Dead, 0);
+    if ( pPlayers[pl]->field_E0 )
     {
-      v59 = 0;
-      v56 = 14;
-	  v21->SetCondition(v56, v59);
-    }
-    v23 = (int)&v21->field_E0;
-    if ( v21->field_E0 )
-    {
-      v24 = *(int *)v23 - pEventTimer->uTimeElapsed;
+      v24 = pPlayers[pl]->field_E0 - pEventTimer->uTimeElapsed;
       if ( v24 > 0 )
-      {
-        *(int *)v23 = v24;
-      }
+        pPlayers[pl]->field_E0 = v24;
       else
       {
-        *(int *)v23 = 0;
-        viewparams->bRedrawGameUI = 1;
+        pPlayers[pl]->field_E0 = 0;
+        viewparams->bRedrawGameUI = true;
       }
     }
-    v25 = (int)&v21->field_E4;
-    if ( v21->field_E4 )
+    if ( pPlayers[pl]->field_E4 )
     {
-      v26 = *(int *)v25 - pEventTimer->uTimeElapsed;
+      v26 = pPlayers[pl]->field_E4 - pEventTimer->uTimeElapsed;
       if ( v26 > 0 )
-      {
-        *(int *)v25 = v26;
-      }
+        pPlayers[pl]->field_E4 = v26;
       else
       {
-        *(int *)v25 = 0;
-        viewparams->bRedrawGameUI = 1;
+        pPlayers[pl]->field_E4 = 0;
+        viewparams->bRedrawGameUI = true;
       }
     }
-    v27 = (int)&v21->field_E8;
-    if ( v21->field_E8 )
+    if ( pPlayers[pl]->field_E8 )
     {
-      v28 = *(int *)v27 - pEventTimer->uTimeElapsed;
+      v28 = pPlayers[pl]->field_E8 - pEventTimer->uTimeElapsed;
       if ( v28 > 0 )
-      {
-        *(int *)v27 = v28;
-      }
+        pPlayers[pl]->field_E8 = v28;
       else
       {
-        *(int *)v27 = 0;
-        viewparams->bRedrawGameUI = 1;
+        pPlayers[pl]->field_E8 = 0;
+        viewparams->bRedrawGameUI = true;
       }
     }
-    v29 = (int)&v21->field_EC;
-    if ( v21->field_EC )
+    if ( pPlayers[pl]->field_EC )
     {
-      v30 = *(int *)v29 - pEventTimer->uTimeElapsed;
+      v30 = pPlayers[pl]->field_EC - pEventTimer->uTimeElapsed;
       if ( v30 > 0 )
-      {
-        *(int *)v29 = v30;
-      }
+        pPlayers[pl]->field_EC = v30;
       else
       {
-        *(int *)v29 = 0;
-        viewparams->bRedrawGameUI = 1;
+        pPlayers[pl]->field_EC = 0;
+        viewparams->bRedrawGameUI = true;
+      }
+    }
+    if ( pPlayers[pl]->field_F0 )
+    {
+      v32 = pPlayers[pl]->field_F0 - pEventTimer->uTimeElapsed;
+      if ( v32 > 0 )
+        pPlayers[pl]->field_F0 = v32;
+      else
+      {
+        pPlayers[pl]->field_F0 = 0;
+        viewparams->bRedrawGameUI = true;
       }
     }
-    v31 = (int)&v21->field_F0;
-    if ( v21->field_F0 )
+    if ( pPlayers[pl]->field_F4 )
     {
-      v32 = *(int *)v31 - pEventTimer->uTimeElapsed;
-      if ( v32 > 0 )
-      {
-        *(int *)v31 = v32;
-      }
+      v34 = pPlayers[pl]->field_F4 - pEventTimer->uTimeElapsed;
+      if ( v34 > 0 )
+        pPlayers[pl]->field_F4 = v34;
       else
       {
-        *(int *)v31 = 0;
-        viewparams->bRedrawGameUI = 1;
+        pPlayers[pl]->field_F4 = 0;
+        viewparams->bRedrawGameUI = true;
       }
     }
-    v33 = (int)&v21->field_F4;
-    if ( v21->field_F4 )
+    if ( pPlayers[pl]->field_F8 )
     {
-      v34 = *(int *)v33 - pEventTimer->uTimeElapsed;
-      if ( v34 > 0 )
-      {
-        *(int *)v33 = v34;
-      }
+      v36 = pPlayers[pl]->field_F8 - pEventTimer->uTimeElapsed;
+      if ( v36 > 0 )
+        pPlayers[pl]->field_F8 = v36;
       else
       {
-        *(int *)v33 = 0;
-        viewparams->bRedrawGameUI = 1;
+        pPlayers[pl]->field_F8 = 0;
+        viewparams->bRedrawGameUI = true;
       }
     }
-    v35 = (int)&v21->field_F8;
-    if ( v21->field_F8 )
+    if ( pPlayers[pl]->field_FC )
     {
-      v36 = *(int *)v35 - pEventTimer->uTimeElapsed;
-      if ( v36 > 0 )
-      {
-        *(int *)v35 = v36;
-      }
+      v38 = pPlayers[pl]->field_FC - pEventTimer->uTimeElapsed;
+      if ( v38 > 0 )
+        pPlayers[pl]->field_FC = v38;
       else
       {
-        *(int *)v35 = 0;
-        viewparams->bRedrawGameUI = 1;
+        pPlayers[pl]->field_FC = 0;
+        viewparams->bRedrawGameUI = true;
       }
     }
-    v37 = (int)&v21->field_FC;
-    if ( v21->field_FC )
+    if ( pPlayers[pl]->field_100 )
     {
-      v38 = *(int *)v37 - pEventTimer->uTimeElapsed;
-      if ( v38 > 0 )
-      {
-        *(int *)v37 = v38;
-      }
+      v40 = pPlayers[pl]->field_100 - pEventTimer->uTimeElapsed;
+      if ( v40 > 0 )
+        pPlayers[pl]->field_100 = v40;
       else
       {
-        *(int *)v37 = 0;
-        viewparams->bRedrawGameUI = 1;
+        pPlayers[pl]->field_100 = 0;
+        viewparams->bRedrawGameUI = true;
       }
     }
-    v39 = (int)&v21->field_100;
-    if ( v21->field_100 )
+    if ( pPlayers[pl]->field_104 )
     {
-      v40 = *(int *)v39 - pEventTimer->uTimeElapsed;
-      if ( v40 > 0 )
-      {
-        *(int *)v39 = v40;
-      }
+      v42 = pPlayers[pl]->field_104 - pEventTimer->uTimeElapsed;
+      if ( v42 > 0 )
+        pPlayers[pl]->field_104 = v42;
       else
       {
-        *(int *)v39 = 0;
-        viewparams->bRedrawGameUI = 1;
+        pPlayers[pl]->field_104 = 0;
+        viewparams->bRedrawGameUI = true;
       }
     }
-    v41 = (int)&v21->field_104;
-    if ( v21->field_104 )
-    {
-      v42 = *(int *)v41 - pEventTimer->uTimeElapsed;
-      if ( v42 > 0 )
-      {
-        *(int *)v41 = v42;
-      }
-      else
-      {
-        *(int *)v41 = 0;
-        viewparams->bRedrawGameUI = 1;
-      }
-    }
-    if ( v21->pConditions[2] | v21->pConditions[12] | v21->pConditions[13] | v21->pConditions[14] | v21->pConditions[15] | v21->pConditions[16] )
-      --v65;
-    v43 = (signed __int64)v21->pPlayerBuffs[7].uExpireTime > 0;
+    if ( pPlayers[pl]->pConditions[Condition_Sleep] | pPlayers[pl]->pConditions[Condition_Paralyzed]
+       | pPlayers[pl]->pConditions[Condition_Unconcious] | pPlayers[pl]->pConditions[Condition_Dead]
+       | pPlayers[pl]->pConditions[Condition_Pertified] | pPlayers[pl]->pConditions[Condition_Eradicated] )
+      --party_condition_flag;
+    v43 = (signed __int64)pPlayers[pl]->pPlayerBuffs[PLAYER_BUFF_HASTE].uExpireTime > 0; //
 
-    for (uint k = 0; k < 24; ++k)
-      v21->pPlayerBuffs[k].IsBuffExpiredToTime(pParty->uTimePlayed);
+    for ( uint k = 0; k < 24; ++k )
+      pPlayers[pl]->pPlayerBuffs[k].IsBuffExpiredToTime(pParty->uTimePlayed);
 
-    if ( v43 && (signed __int64)v21->pPlayerBuffs[7].uExpireTime <= 0 )
-      v21->SetCondition(1u, 0);
-    ++v62;
+    if ( v43 && (signed __int64)pPlayers[pl]->pPlayerBuffs[7].uExpireTime <= 0 )
+      pPlayers[pl]->SetCondition(Condition_Weak, 0);
   }
-  while ( (signed int)v62 <= (signed int)&pPlayers[4] );
+
   v46 = (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_HASTE].uExpireTime > 0;
 
   for (uint i = 0; i < 20; ++i)
   {
     if (pParty->pPartyBuffs[i].IsBuffExpiredToTime(pParty->uTimePlayed) == 1)
-      viewparams->bRedrawGameUI = 1;
+      viewparams->bRedrawGameUI = true;
   }
 
   if ( v46 && (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_HASTE].uExpireTime <= 0 )
@@ -1137,48 +931,42 @@
       if (!pPlayers[pBuf->uCaster]->CanAct())
       {
         pBuf->Reset();
-        if (dword_4EE07C[i] == 7 )
+        if (dword_4EE07C[i] == PARTY_BUFF_FLY )
           pParty->bFlying = false;
       }
     }
   }
 
-  v51 = v65;
-  if ( v65 )
-    goto LABEL_135;
-  if ( pCurrentScreen != SCREEN_REST )
-  {
-    v52 = (signed int)&pPlayers[1];
-    while ( 1 )
-    {
-      v53 = *(int *)v52;
-      if ( *(_QWORD *)(*(int *)v52 + 16) )
-        break;
-      v52 += 4;
-      if ( v52 > (signed int)&pPlayers[4] )
-        goto LABEL_135;
-    }
-    *(int *)(v53 + 16) = 0;
-    *(int *)(v53 + 20) = 0;
-    v51 = 1;
-LABEL_135:
-    if ( pCurrentScreen != SCREEN_REST
-      && (!v51 || dword_5C35C0) )
-      uGameState = GAME_STATE_PARTY_DIED;
-  }
-  if ( uActiveCharacter )
+  if ( !party_condition_flag )
   {
     if ( pCurrentScreen != SCREEN_REST )
     {
-      v54 = pPlayers[uActiveCharacter];
-      if ( v54->pConditions[2]
-        || v54->pConditions[12]
-        || v54->pConditions[13]
-        || v54->pConditions[14]
-        || v54->pConditions[15]
-        || v54->pConditions[16] )
+      for ( uint pl = 1; pl <= 4; pl++ )
       {
-        viewparams->bRedrawGameUI = 1;
+        if ( pPlayers[pl]->pConditions[Condition_Sleep] )
+        {
+          pPlayers[pl]->pConditions[Condition_Sleep] = 0;
+          party_condition_flag = 1;
+          break;
+        }
+      }
+      if ( !party_condition_flag || dword_5C35C0 )
+        uGameState = GAME_STATE_PARTY_DIED;
+    }
+  }
+
+  if ( uActiveCharacter )//    
+  {
+    if ( pCurrentScreen != SCREEN_REST )
+    {
+      if ( pPlayers[uActiveCharacter]->pConditions[Condition_Sleep]
+        || pPlayers[uActiveCharacter]->pConditions[Condition_Paralyzed]
+        || pPlayers[uActiveCharacter]->pConditions[Condition_Unconcious]
+        || pPlayers[uActiveCharacter]->pConditions[Condition_Dead]
+        || pPlayers[uActiveCharacter]->pConditions[Condition_Pertified]
+        || pPlayers[uActiveCharacter]->pConditions[Condition_Eradicated] )
+      {
+        viewparams->bRedrawGameUI = true;
         uActiveCharacter = pParty->GetNextActiveCharacter();
       }
     }
@@ -3411,7 +3199,7 @@
 }
 
 //----- (004BDAAF) --------------------------------------------------------
-bool __fastcall MerchandiseTest(ItemGen *item, int _2da_idx)
+bool MerchandiseTest(ItemGen *item, int _2da_idx)
 {
   int v6; // edx@8
   int v7; // edx@9
@@ -3423,28 +3211,28 @@
 
   if ( (p2DEvents[_2da_idx - 1].uType != 4 || (signed int)item->uItemID < 740 || (signed int)item->uItemID > 771)
     && ((signed int)item->uItemID >= 600 || (signed int)item->uItemID >= 529 && (signed int)item->uItemID <= 599) || item->IsStolen())
-    return 0;
+    return false;
   switch( p2DEvents[_2da_idx - 1].uType )
   {
     case BuildingType_WeaponShop:
     {
-      test = item->GetItemEquipType() <= 2;
+      test = item->GetItemEquipType() <= EQUIP_BOW;
       break;
     }
     case BuildingType_ArmorShop:
     {
-      test = item->GetItemEquipType() >= 3;
+      test = item->GetItemEquipType() >= EQUIP_ARMOUR && item->GetItemEquipType() <= EQUIP_BOOTS;
       break;
     }
     case BuildingType_MagicShop:
     {
-      test = item->GetPlayerSkillType() == 38 || item->GetItemEquipType() == 16;
+      test = item->GetPlayerSkillType() == PLAYER_SKILL_MISC || item->GetItemEquipType() == EQIUP_ANY;
       break;
     }
     case BuildingType_AlchemistShop:
     {
-      test = item->GetItemEquipType() == 13 || item->GetItemEquipType() == 14 
-            || (item->GetItemEquipType() > 14 && !(item->GetItemEquipType() != 17 
+      test = item->GetItemEquipType() == EQUIP_REAGENT || item->GetItemEquipType() == EQUIP_POTION 
+            || (item->GetItemEquipType() > EQUIP_POTION && !(item->GetItemEquipType() != EQUIP_MESSAGE_SCROLL 
             || (signed int)item->uItemID < 740) && item->uItemID != 771);
       break;
     }
@@ -3455,54 +3243,4 @@
     }
   }
   return test;
-/*
-  if ( p2DEvents[a2 - 1].uType == 1 )
-  {
-    v11 = __OFSUB__(v5, 2);
-    v9 = v5 == 2;
-    v10 = v5 - 2 < 0;
-    goto LABEL_23;
-  }
-  if ( p2DEvents[a2 - 1].uType > 2 )
-  {
-    if ( p2DEvents[a2 - 1].uType == 3 )
-    {
-      if ( pItemsTable->pItems[v4].uSkillType != 38 )
-        return v5 == 16;
-      return 1;
-    }
-    if ( p2DEvents[a2 - 1].uType != 4 || v5 < 13 )
-      return 0;
-	if ( p2DEvents[a2 - 1].uType == 4)
-	{
-		if ( v5 < 13 )
-		  return 0;
-		if ( v5 <= 14 )
-		  return 1;
-		if ( v5 != 17 || (signed int)v3 < 740 )
-		  return 0;
-		v11 = __OFSUB__(v3, 771);
-		v9 = v3 == 771;
-		v10 = ((v3 - 771) & 0x80000000u) != 0;
-LABEL_23:
-		if ( !((unsigned __int8)(v10 ^ v11) | v9) )
-		  return 0;
-		return 1;
-	}
-  }
-  if ( p2DEvents[a2 - 1].uType == 2 )
-  {
-	  if ( v5 >= 3 )
-	  {
-		v11 = __OFSUB__(v5, 9);
-		v9 = v5 == 9;
-		v10 = v5 - 9 < 0;
-		goto LABEL_23;
-	  }
-  }
-  return 0;
-*/
-}
-
-
-
+}
\ No newline at end of file
--- a/mm7_5.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/mm7_5.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -55,228 +55,161 @@
 //----- (00438F8F) --------------------------------------------------------
 void area_of_effect__damage_evaluate()
 {
-  int v0; // edx@1
-  char *v1; // esi@2
-  int v2; // ecx@3
+  int attacker_type; // ecx@3
   signed int v3; // eax@3
-  SpriteObject *v4; // eax@4
-  signed int v5; // eax@4
-  signed int v6; // eax@6
-  unsigned int v7; // edi@6
-  int v8; // eax@6
-  __int16 v9; // bx@8
+  unsigned int target_id; // edi@6
+  int target_type; // eax@6
   int v10; // edi@8
-  Vec3_int_ v11; // ST04_12@9
+  Vec3_int_ attacker_coord; // ST04_12@9
   int v12; // ST0C_4@10
-  Actor *v13; // edi@11
-  int v14; // edx@15
   int v15; // edx@15
-  int v16; // ebx@15
-  signed int v17; // eax@15
-  int v18; // edi@15
   int v19; // edi@15
-  Vec3_int_ v20; // ST04_12@16
-  Vec3_int_ *v21; // eax@17
-  unsigned int v22; // edx@17
   int v23; // edx@18
   int v24; // eax@18
-  Vec3_int_ v25; // ST04_12@19
-  unsigned int v26; // ebx@20
-  Player *v27; // edi@20
-  Actor *v28; // edi@27
-  int v29; // ebx@29
   int v30; // eax@29
   int v31; // edx@29
   int v32; // eax@29
   int v33; // ST24_4@29
-  Vec3_int_ v34; // ST04_12@30
-  Vec3_int_ *v35; // eax@31
   SpriteObject *v36; // [sp+0h] [bp-28h]@0
-  signed int v37; // [sp+4h] [bp-24h]@5
-  int v38; // [sp+4h] [bp-24h]@15
-  signed int v39; // [sp+8h] [bp-20h]@3
-  int v40; // [sp+8h] [bp-20h]@15
-  int v41; // [sp+Ch] [bp-1Ch]@5
-  int v42; // [sp+Ch] [bp-1Ch]@15
-  int v43; // [sp+10h] [bp-18h]@1
+  int attacker_id; // [sp+10h] [bp-18h]@1
   int v44; // [sp+14h] [bp-14h]@15
-  unsigned int uActorID; // [sp+18h] [bp-10h]@6
-  Vec3_int_ *pVelocity; // [sp+1Ch] [bp-Ch]@2
+  //Vec3_int_ *pVelocity; // [sp+1Ch] [bp-Ch]@2
   int a1; // [sp+20h] [bp-8h]@8
   int v48; // [sp+24h] [bp-4h]@8
 
-  v0 = 0;
-  v43 = 0;
-  if ( stru_50FE08.count > 0 )
+
+  for ( attacker_id = 0; attacker_id < AttackerInfo.count; ++attacker_id )
   {
-    pVelocity = &stru_50FE08.vec_4B4;
-    v1 = (char *)stru_50FE08.pZs;
-    do
+    attacker_type = PID_TYPE(AttackerInfo.pIDs[attacker_id]);
+    v3 = PID_ID(AttackerInfo.pIDs[attacker_id]);
+
+    if ( attacker_type == 2 )
     {
-      v2 = PID_TYPE(*((short *)v1 - 300));
-      v3 = PID_ID((signed int)*((short *)v1 - 300));
-      v39 = PID_ID((signed int)*((short *)v1 - 300));
-      if ( v2 == 2 )
-      {
-        v4 = &pSpriteObjects[v3];
-        v36 = v4;
-        v5 = v4->spell_caster_pid;
-        v2 = PID_TYPE(v5);
-        v3 = PID_ID(v5);
-      }
-      v41 = v2;
-      v37 = v3;
-      if ( stru_50FE08.field_3EC[v0] & 1 )
+      v36 = &pSpriteObjects[v3];
+      attacker_type = PID_TYPE(pSpriteObjects[v3].spell_caster_pid);
+      v3 = PID_ID(pSpriteObjects[v3].spell_caster_pid);
+    }
+
+    if ( AttackerInfo.field_3EC[attacker_id] & 1 )
+    {
+      target_id = PID_ID(ai_near_actors_targets_pid[v3]);
+      target_type = PID_TYPE(ai_near_actors_targets_pid[v3]) - 3;
+      if ( target_type )
       {
-        v6 = ai_near_actors_targets_pid[v3];
-        v7 = PID_ID(v6);
-        v8 = PID_TYPE(v6) - 3;
-        uActorID = v7;
-        if ( v8 )
+        if ( target_type == 1 )//party damage from monsters(   )
         {
-          if ( v8 == 1 )
+          v10 = pParty->vPosition.y - AttackerInfo.pYs[attacker_id];
+          a1 = pParty->vPosition.x - AttackerInfo.pXs[attacker_id];
+          v48 = v10;
+          if ( a1 * a1 + v10 * v10
+             + ((signed int)(pParty->vPosition.z + pParty->uPartyHeight) >> (1 - AttackerInfo.pZs[attacker_id]))
+             * ((signed int)(pParty->vPosition.z + pParty->uPartyHeight) >> (1 - AttackerInfo.pZs[attacker_id]))
+             < (unsigned int)((AttackerInfo.field_324[attacker_id] + 32) * (AttackerInfo.field_324[attacker_id] + 32)) )
           {
-            v9 = *(short *)v1;
-            v10 = pParty->vPosition.y - *((short *)v1 - 100);
-            a1 = pParty->vPosition.x - *((short *)v1 - 200);
-            v48 = v10;
-            if ( a1 * a1
-               + v10 * v10
-               + ((signed int)(pParty->vPosition.z + pParty->uPartyHeight) >> (1 - v9))
-               * ((signed int)(pParty->vPosition.z + pParty->uPartyHeight) >> (1 - v9)) < (unsigned int)((*((short *)v1 + 100) + 32) * (*((short *)v1 + 100) + 32)) )
+            attacker_coord.x = AttackerInfo.pXs[attacker_id];
+            attacker_coord.y = AttackerInfo.pYs[attacker_id];
+            attacker_coord.z = AttackerInfo.pZs[attacker_id];
+            if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, attacker_coord) )
+              DamagePlayerFromMonster(AttackerInfo.pIDs[attacker_id], AttackerInfo.field_450[attacker_id], &AttackerInfo.vec_4B4[attacker_id], stru_50C198.which_player_to_attack(&pActors[v3]));
+          }
+        }
+      }
+      else//Actor damage from monsters(  )
+      {
+        if ( SHIDWORD(pActors[target_id].pActorBuffs[ACTOR_BUFF_PARALYZED].uExpireTime) > 0
+          || SHIDWORD(pActors[target_id].pActorBuffs[ACTOR_BUFF_PARALYZED].uExpireTime) >= 0
+           && LODWORD(pActors[target_id].pActorBuffs[ACTOR_BUFF_PARALYZED].uExpireTime)
+          || pActors[target_id].CanAct() )
+        {
+          v15 = pActors[target_id].vPosition.y - AttackerInfo.pYs[attacker_id];
+          a1 = pActors[target_id].vPosition.x - AttackerInfo.pXs[attacker_id];
+          v44 = pActors[target_id].vPosition.z;
+          v19 = AttackerInfo.pYs[attacker_id] + pActors[target_id].uActorRadius;
+          v48 = v15;
+          if ( a1 * a1 + v15 * v15 + (pActors[target_id].vPosition.z + (pActors[target_id].uActorHeight >> 1) - AttackerInfo.pZs[attacker_id])
+           * (pActors[target_id].vPosition.z + (pActors[target_id].uActorHeight >> 1) - AttackerInfo.pZs[attacker_id]) < (unsigned int)(v19 * v19) )
+          {
+            attacker_coord.x = AttackerInfo.pXs[attacker_id];
+            attacker_coord.y = AttackerInfo.pYs[attacker_id];
+            attacker_coord.z = AttackerInfo.pZs[attacker_id];
+            if ( sub_407A1C(pActors[target_id].vPosition.x, pActors[target_id].vPosition.y, pActors[target_id].vPosition.z + 50, attacker_coord) )
             {
-              v11.z = *(short *)v1;
-              v11.y = *((short *)v1 - 100);
-              v11.x = *((short *)v1 - 200);
-              if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, v11) )
-              {
-                v12 = stru_50C198.which_player_to_attack(&pActors[v39]);
-                DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v12);
-              }
+              Vec3_int_::Normalize(&a1, &v48, &v44);
+              AttackerInfo.vec_4B4[attacker_id].x = a1;
+              AttackerInfo.vec_4B4[attacker_id].y = v48;
+              AttackerInfo.vec_4B4[attacker_id].z = v44;
+              ActorDamageFromMonster(AttackerInfo.pIDs[attacker_id], target_id, &AttackerInfo.vec_4B4[attacker_id], AttackerInfo.field_450[attacker_id]);
             }
           }
         }
-        else
+      }
+    }
+    else //damage from spells(  ( ))
+    {
+      v23 = pParty->vPosition.y - AttackerInfo.pYs[attacker_id];
+      v24 = ((signed int)pParty->uPartyHeight >> 1) - AttackerInfo.pZs[attacker_id];
+      a1 = pParty->vPosition.x - AttackerInfo.pXs[attacker_id];
+      v48 = v23;
+      if ( a1 * a1 + v23 * v23 + (pParty->vPosition.z + v24) * (pParty->vPosition.z + v24) < (unsigned int)((AttackerInfo.field_324[attacker_id] + 32) * (AttackerInfo.field_324[attacker_id] + 32)) )
+      {//party damage ( )
+        attacker_coord.x = AttackerInfo.pXs[attacker_id];
+        attacker_coord.y = AttackerInfo.pYs[attacker_id];
+        attacker_coord.z = AttackerInfo.pZs[attacker_id];
+        if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, attacker_coord) )
         {
-          v13 = &pActors[v7];
-          if ( SHIDWORD(v13->pActorBuffs[ACTOR_BUFF_PARALYZED].uExpireTime) > 0
-            || SHIDWORD(v13->pActorBuffs[ACTOR_BUFF_PARALYZED].uExpireTime) >= 0 && LODWORD(v13->pActorBuffs[ACTOR_BUFF_PARALYZED].uExpireTime)
-            || v13->CanAct() )
+          for ( uint i = 0; i < 4; ++i )
           {
-            v14 = v13->vPosition.y;
-            v40 = v13->vPosition.x;
-            v38 = v14;
-            v15 = v14 - *((short *)v1 - 100);
-            v16 = *(short *)v1;
-            v42 = v13->vPosition.z;
-            a1 = v40 - *((short *)v1 - 200);
-            v17 = v13->uActorHeight;
-            v18 = v13->uActorRadius;
-            v44 = v42;
-            v19 = *((short *)v1 + 100) + v18;
-            v48 = v15;
-            if ( a1 * a1 + v15 * v15 + (v42 + (v17 >> 1) - v16) * (v42 + (v17 >> 1) - v16) < (unsigned int)(v19 * v19) )
+            if ( !(HIDWORD(pParty->pPlayers[i].pConditions[Condition_Dead]) | LODWORD(pParty->pPlayers[i].pConditions[Condition_Dead]))
+              && !pParty->pPlayers[i].pConditions[Condition_Pertified] && !pParty->pPlayers[i].pConditions[Condition_Eradicated] )
+              DamagePlayerFromMonster(AttackerInfo.pIDs[attacker_id], AttackerInfo.field_450[attacker_id], &AttackerInfo.vec_4B4[attacker_id], i);
+          }
+        }
+      }
+      if ( (signed int)uNumActors > 0 )
+      {//actors damage(  )
+        for ( int actorID = 0; (signed int)actorID < (signed int)uNumActors; ++actorID )
+        {
+          if ( pActors[actorID].CanAct() )
+          {
+            v30 = pActors[actorID].vPosition.y - AttackerInfo.pYs[attacker_id];
+            a1 = pActors[actorID].vPosition.x - AttackerInfo.pXs[attacker_id];
+            v31 = pActors[actorID].vPosition.z;
+            v48 = v30;
+            v44 = pActors[actorID].vPosition.z;
+            v32 = (pActors[actorID].uActorHeight >> 1) - AttackerInfo.pZs[attacker_id];
+            v33 = pActors[actorID].uActorRadius + AttackerInfo.pYs[attacker_id];
+            if ( a1 * a1 + v48 * v48 + (v31 + v32) * (v31 + v32) < (unsigned int)(v33 * v33) )
             {
-              v20.z = *(short *)v1;
-              v20.y = *((short *)v1 - 100);
-              v20.x = *((short *)v1 - 200);
-              if ( sub_407A1C(v40, v38, v42 + 50, v20) )
+              attacker_coord.x = AttackerInfo.pXs[attacker_id];
+              attacker_coord.y = AttackerInfo.pYs[attacker_id];
+              attacker_coord.z = AttackerInfo.pZs[attacker_id];
+              if ( sub_407A1C(pActors[actorID].vPosition.x, pActors[actorID].vPosition.y, pActors[actorID].vPosition.z + 50, attacker_coord) )
               {
                 Vec3_int_::Normalize(&a1, &v48, &v44);
-                v21 = pVelocity;
-                v22 = uActorID;
-                pVelocity->x = a1;
-                v21->y = v48;
-                v21->z = v44;
-                sub_43B1B0(*((short *)v1 - 300), v22, v21, stru_50FE08.field_450[v43]);
+                AttackerInfo.vec_4B4[attacker_id].x = a1;
+                AttackerInfo.vec_4B4[attacker_id].y = v48;
+                AttackerInfo.vec_4B4[attacker_id].z = v44;
+                switch ( attacker_type )
+                {
+                  case OBJECT_Player:
+                    DamageMonsterFromParty(AttackerInfo.pIDs[attacker_id], actorID, &AttackerInfo.vec_4B4[attacker_id]);
+                    break;
+                  case OBJECT_Actor:
+                    if ( v36 && pActors[v3].GetActorsRelation(&pActors[actorID]) )
+                      ActorDamageFromMonster(AttackerInfo.pIDs[attacker_id], actorID, &AttackerInfo.vec_4B4[attacker_id], v36->field_61);
+                    break;
+                  case OBJECT_Item:
+                    sub_43B057(AttackerInfo.pIDs[attacker_id], actorID, &AttackerInfo.vec_4B4[attacker_id]);
+                    break;
+                }
               }
             }
           }
         }
       }
-      else
-      {
-        v23 = pParty->vPosition.y - *((short *)v1 - 100);
-        v24 = ((signed int)pParty->uPartyHeight >> 1) - *(short *)v1;
-        a1 = pParty->vPosition.x - *((short *)v1 - 200);
-        v48 = v23;
-        if ( a1 * a1 + v23 * v23 + (pParty->vPosition.z + v24) * (pParty->vPosition.z + v24) < (unsigned int)((*((short *)v1 + 100) + 32) * (*((short *)v1 + 100) + 32)) )
-        {
-          v25.z = *(short *)v1;
-          v25.y = *((short *)v1 - 100);
-          v25.x = *((short *)v1 - 200);
-          if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, v25) )
-          {
-            v26 = 0;
-            v27 = pParty->pPlayers.data();//[0].pConditions[15];
-            do
-            {
-				if ( !(HIDWORD(v27->pConditions[14]) | LODWORD(v27->pConditions[14])) && !v27->pConditions[15] && !v27->pConditions[16] )
-                DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v26);
-              ++v27;
-              ++v26;
-            }
-			while ( v27 <= &pParty->pPlayers[3] );
-          }
-        }
-        uActorID = 0;
-        if ( (signed int)uNumActors > 0 )
-        {
-          v28 = pActors.data();//[0].vPosition.z;
-          do
-          {
-            if ( v28->CanAct() )
-            {
-              v29 = *(short *)v1;
-			  v30 = v28->vPosition.y - *((short *)v1 - 100);
-			  a1 = v28->vPosition.x - *((short *)v1 - 200);
-			  v31 = v28->vPosition.z;
-              v48 = v30;
-              v44 = v31;
-			  v32 = (v28->uActorHeight >> 1) - v29;
-			  v33 = v28->uActorRadius + *((short *)v1 + 100);
-              if ( a1 * a1 + v48 * v48 + (v31 + v32) * (v31 + v32) < (unsigned int)(v33 * v33) )
-              {
-                v34.z = *(short *)v1;
-                v34.y = *((short *)v1 - 100);
-                v34.x = *((short *)v1 - 200);
-				if ( sub_407A1C(v28->vPosition.x, v28->vPosition.y, v28->vPosition.z + 50, v34) )
-                {
-                  Vec3_int_::Normalize(&a1, &v48, &v44);
-                  v35 = pVelocity;
-                  pVelocity->x = a1;
-                  v35->y = v48;
-                  v35->z = v44;
-                  switch ( v41 )
-                  {
-                    case OBJECT_Player:
-                      DamageMonsterFromParty(*((short *)v1 - 300), uActorID, v35);
-                      break;
-                    case OBJECT_Actor:
-                      if ( v36 && pActors[v37].GetActorsRelation(v28) )
-                        sub_43B1B0(*((short *)v1 - 300), uActorID, pVelocity, v36->field_61);
-                      break;
-                    case OBJECT_Item:
-                      sub_43B057(*((short *)v1 - 300), uActorID, v35);
-                      break;
-                  }
-                }
-              }
-            }
-            ++uActorID;
-            ++v28;
-          }
-          while ( (signed int)uActorID < (signed int)uNumActors );
-        }
-      }
-      ++pVelocity;
-      v0 = v43 + 1;
-      v1 += 2;
-      ++v43;
     }
-    while ( v43 < stru_50FE08.count );
   }
-  stru_50FE08.count = 0;
+  AttackerInfo.count = 0;
 }
 
 
@@ -302,7 +235,7 @@
     switch (PID_TYPE(pSpriteObjects[uLayingItemID].spell_caster_pid))
     {
       case OBJECT_Actor:
-        sub_43B1B0(PID(OBJECT_Item, uLayingItemID), PID_ID(a2), &layingitem_vel_50FDFC, pSpriteObjects[uLayingItemID].field_61);
+        ActorDamageFromMonster(PID(OBJECT_Item, uLayingItemID), PID_ID(a2), &layingitem_vel_50FDFC, pSpriteObjects[uLayingItemID].field_61);
         break;
       case OBJECT_Player:
         DamageMonsterFromParty(PID(OBJECT_Item, uLayingItemID), PID_ID(a2), &layingitem_vel_50FDFC);
@@ -402,117 +335,112 @@
 }
 
 //----- (0043B1B0) --------------------------------------------------------
-void sub_43B1B0(signed int a1, unsigned int a2, Vec3_int_ *pVelocity, signed int a4)
+void ActorDamageFromMonster(signed int attacker_id, unsigned int actor_id, Vec3_int_ *pVelocity, signed int a4)
 {
   int v4; // ebx@1
-  SpriteObject *v5; // eax@2
+  //SpriteObject *v5; // eax@2
   int v6; // eax@3
-  Actor *v7; // esi@4
-  Actor *v8; // edi@4
+  //Actor *v7; // esi@4
+  //Actor *v8; // edi@4
   char v9; // zf@5
   __int64 v10; // qax@8
   signed __int16 v11; // cx@9
   signed int v12; // ecx@20
   int v13; // ecx@22
   int v14; // edi@30
-  unsigned int uActorID; // [sp+Ch] [bp-8h]@1
+  //unsigned int uActorID; // [sp+Ch] [bp-8h]@1
   signed int v17; // [sp+10h] [bp-4h]@1
   int v18; // [sp+20h] [bp+Ch]@34
 
   v4 = 0;
-  uActorID = a2;
-  v17 = a1;
-  if ( PID_TYPE(a1) == OBJECT_Item)
+  v17 = attacker_id;
+  if ( PID_TYPE(attacker_id) == OBJECT_Item)
   {
-    v5 = &pSpriteObjects[PID_ID(a1)];
-    v4 = v5->field_60_distance_related_prolly_lod;
-    v17 = v5->spell_caster_pid;
+    v4 = pSpriteObjects[PID_ID(attacker_id)].field_60_distance_related_prolly_lod;
+    v17 = pSpriteObjects[PID_ID(attacker_id)].spell_caster_pid;
   }
-  LOWORD(v6) = PID_TYPE(v17);
-  if ( v6 == OBJECT_Actor)
+  if ( PID_TYPE(v17) == OBJECT_Actor)
   {
-    v7 = &pActors[a2];
-    v8 = &pActors[PID_ID(v17)];
-    v6 = pActors[a2].IsNotAlive();
+    v6 = pActors[actor_id].IsNotAlive();
     if ( !v6 )
     {
-      v9 = v7->uAIState == 7;
-      v7->uLastCharacterIDToHit = v17;
+      v9 = pActors[actor_id].uAIState == 7;
+      pActors[actor_id].uLastCharacterIDToHit = v17;
       if ( v9 )
-        BYTE2(v7->uAttributes) |= 2u;
-      v6 = v8->_4273BB_DoesHitOtherActor(v7, v4, 0);
+        BYTE2(pActors[actor_id].uAttributes) |= 2u;
+      v6 = pActors[PID_ID(v17)]._4273BB_DoesHitOtherActor(&pActors[actor_id], v4, 0);
       if ( v6 )
       {
-        v10 = (unsigned int)v8->_43B3E0_CalcDamage(a4);
-        if ( (signed __int64)v8->pActorBuffs[ACTOR_BUFF_SHRINK].uExpireTime > 0 )
+        v10 = (unsigned int)pActors[PID_ID(v17)]._43B3E0_CalcDamage(a4);
+        if ( (signed __int64)pActors[PID_ID(v17)].pActorBuffs[ACTOR_BUFF_SHRINK].uExpireTime > 0 )
         {
-          v11 = v8->pActorBuffs[ACTOR_BUFF_SHRINK].uPower;
+          v11 = pActors[PID_ID(v17)].pActorBuffs[ACTOR_BUFF_SHRINK].uPower;
           if ( v11 )
             v10 = (signed int)v10 / (unsigned __int16)v11;
         }
-        if ( SHIDWORD(v7->pActorBuffs[ACTOR_BUFF_STONED].uExpireTime) >= SHIDWORD(v10)
-          && (SHIDWORD(v7->pActorBuffs[ACTOR_BUFF_STONED].uExpireTime) > SHIDWORD(v10)
-           || LODWORD(v7->pActorBuffs[ACTOR_BUFF_STONED].uExpireTime) > HIDWORD(v10)) )
+        if ( SHIDWORD(pActors[actor_id].pActorBuffs[ACTOR_BUFF_STONED].uExpireTime) >= SHIDWORD(v10)
+          && (SHIDWORD(pActors[actor_id].pActorBuffs[ACTOR_BUFF_STONED].uExpireTime) > SHIDWORD(v10)
+           || LODWORD(pActors[actor_id].pActorBuffs[ACTOR_BUFF_STONED].uExpireTime) > HIDWORD(v10)) )
           LODWORD(v10) = 0;
         if ( a4 != HIDWORD(v10) )
         {
           if ( a4 - HIDWORD(v10) == 1 )
           {
-            v12 = v8->pMonsterInfo.uAttack2Type;
-            if ( SHIDWORD(v7->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) >= SHIDWORD(v10)
-              && (SHIDWORD(v7->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) > SHIDWORD(v10)
-               || LODWORD(v7->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) > HIDWORD(v10)) )
+            v12 = pActors[PID_ID(v17)].pMonsterInfo.uAttack2Type;
+            if ( SHIDWORD(pActors[actor_id].pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) >= SHIDWORD(v10)
+              && (SHIDWORD(pActors[actor_id].pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) > SHIDWORD(v10)
+               || LODWORD(pActors[actor_id].pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime) > HIDWORD(v10)) )
               LODWORD(v10) = (signed int)v10 >> 1;
             goto LABEL_30;
           }
           if ( a4 - HIDWORD(v10) == 2 )
           {
-            v13 = v7->pMonsterInfo.uSpell1ID;
+            v13 = pActors[actor_id].pMonsterInfo.uSpell1ID;
           }
           else
           {
             if ( a4 - HIDWORD(v10) != 3 )
             {
               if ( a4 - HIDWORD(v10) == 4 )
-                v12 = v8->pMonsterInfo.field_3C_some_special_attack;
+                v12 = pActors[PID_ID(v17)].pMonsterInfo.field_3C_some_special_attack;
               else
                 v12 = 4;
 LABEL_30:
-              v14 = stru_50C198.CalcMagicalDamageToActor(v7, v12, v10);
-              v7->sCurrentHP -= v14;
+              v14 = stru_50C198.CalcMagicalDamageToActor(&pActors[actor_id], v12, v10);
+              pActors[actor_id].sCurrentHP -= v14;
               if ( v14 )
               {
-                if ( v7->sCurrentHP > 0 )
-                  Actor::AI_Stun(uActorID, v17, 0);
+                if ( pActors[actor_id].sCurrentHP > 0 )
+                  Actor::AI_Stun(actor_id, v17, 0);
                 else
-                  Actor::Die(uActorID);
-                Actor::AggroSurroundingPeasants(uActorID, 0);
-                v18 = 20 * v14 / (signed int)v7->pMonsterInfo.uHP;
-                if ( 20 * v14 / (signed int)v7->pMonsterInfo.uHP > 10 )
+                  Actor::Die(actor_id);
+                Actor::AggroSurroundingPeasants(actor_id, 0);
+                v18 = 20 * v14 / (signed int)pActors[actor_id].pMonsterInfo.uHP;
+                if ( 20 * v14 / (signed int)pActors[actor_id].pMonsterInfo.uHP > 10 )
                   v18 = 10;
-                if ( !MonsterStats::BelongsToSupertype(v7->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) )
+                if ( !MonsterStats::BelongsToSupertype(pActors[actor_id].pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) )
                 {
                   pVelocity->x = (unsigned __int64)(v18 * (signed __int64)pVelocity->x) >> 16;
                   pVelocity->y = (unsigned __int64)(v18 * (signed __int64)pVelocity->y) >> 16;
                   pVelocity->z = (unsigned __int64)(v18 * (signed __int64)pVelocity->z) >> 16;
-                  v7->vVelocity.x = 50 * LOWORD(pVelocity->x);
-                  v7->vVelocity.y = 50 * LOWORD(pVelocity->y);
-                  v7->vVelocity.z = 50 * LOWORD(pVelocity->z);
+                  pActors[actor_id].vVelocity.x = 50 * LOWORD(pVelocity->x);
+                  pActors[actor_id].vVelocity.y = 50 * LOWORD(pVelocity->y);
+                  pActors[actor_id].vVelocity.z = 50 * LOWORD(pVelocity->z);
                 }
-                Actor::AddBloodsplatOnDamageOverlay(uActorID, 1, v14);
+                Actor::AddBloodsplatOnDamageOverlay(actor_id, 1, v14);
               }
               else
               {
-                Actor::AI_Stun(uActorID, v17, 0);
+                Actor::AI_Stun(actor_id, v17, 0);
               }
               return;
             }
-            v13 = v7->pMonsterInfo.uSpell2ID;
+            v13 = pActors[actor_id].pMonsterInfo.uSpell2ID;
           }
           v12 = LOBYTE(pSpellStats->pInfos[v13].uSchool);
           goto LABEL_30;
         }
-        v12 = v8->pMonsterInfo.uAttack1Type;
+        v12 = pActors[PID_ID(v17)].pMonsterInfo.uAttack1Type;
         goto LABEL_30;
       }
     }
@@ -1134,7 +1062,7 @@
   std::array<int, 52> dword_4F5B24_ys; // idb
   std::array<int, 52> dword_4F5BF4_xs; // idb
   
-  __debugbreak();
+  //__debugbreak();	//     
 
   v5 = a4->uAttributes;
   v9 = a5->pVertices;
--- a/mm7_6.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/mm7_6.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -893,13 +893,8 @@
 
   int id = a1a.Create(0, 0, 0, 0);
   if (id != -1)
-    stru_50FE08.Add(PID(OBJECT_Item, id),
-               a5,
-               SLOWORD(a1a.vPosition.x),
-               SLOWORD(a1a.vPosition.y),
-               SLOWORD(a1a.vPosition.z),
-               0,
-               0);
+    AttackerInfo.Add(PID(OBJECT_Item, id), a5, SLOWORD(a1a.vPosition.x), SLOWORD(a1a.vPosition.y),
+               SLOWORD(a1a.vPosition.z), 0, 0);
 }
 
 //----- (0042FB5C) --------------------------------------------------------
--- a/mm7_data.cpp	Tue Dec 03 09:22:24 2013 +0600
+++ b/mm7_data.cpp	Tue Dec 03 09:22:28 2013 +0600
@@ -43,7 +43,7 @@
 stru123 stru_5E4C90_MapPersistVars;
 
 #include "stru298.h"
-stru298 stru_50FE08; // weak
+stru298 AttackerInfo; // weak
 
 #include "Autonotes.h"
 std::array<Autonote, 196> pAutonoteTxt; // weak
@@ -1191,11 +1191,10 @@
 float flt_6BE150_look_up_down_dangle = 1.0f; // weak
 //HWND hWnd; // idb
 class OSWindow *window = nullptr;
-int dword_6BE340; // weak
 char pCurrentMapName[32]; // idb
 unsigned int uLevelMapStatsID;
-int dword_6BE364_game_settings_1 = 0; // weak
-int dword_6BE368_debug_settings_2 = 0; // weak
+int dword_6BE364_game_settings_1 = 0;
+int dword_6BE368_debug_settings_2 = 0;
 unsigned __int8 bUseLoResSprites = false;
 unsigned __int8 bUseRegistry = true;
 unsigned __int8 bCanLoadFromCD = false;
@@ -1215,7 +1214,6 @@
 int _702AC0_unused = 0; // weak
 int _702AC4_unused = 0; // weak
 char _702ACC_unused = 0; // weak
-int bDebugResouces; // weak
 unsigned int bNoVideo = false;
 bool bNoIntro = false;
 bool bNoLogo = false;
@@ -1305,7 +1303,6 @@
 struct Texture *pTexture_PlayerFaceEradicated;
 struct Texture *pTexture_PlayerFaceDead;
 std::array< std::array<struct Texture *, 56>, 4> pTextures_PlayerFaces;
-NZIArray<struct Player *, 5> pPlayers;
 __int64 qword_A750D8; // weak
 enum PlayerSpeech PlayerSpeechID;
 int uSpeakingCharacter; // weak
--- a/mm7_data.h	Tue Dec 03 09:22:24 2013 +0600
+++ b/mm7_data.h	Tue Dec 03 09:22:28 2013 +0600
@@ -840,11 +840,34 @@
 //extern char *pCmdLine;
 //extern HWND hWnd; // idb
 extern class OSWindow *window;
-extern int dword_6BE340; // weak
 extern char pCurrentMapName[32]; // idb
 extern unsigned int uLevelMapStatsID;
-extern int dword_6BE364_game_settings_1; // weak
-extern int dword_6BE368_debug_settings_2; // weak
+
+
+#define GAME_SETTINGS_0001                            0x0001
+#define GAME_SETTINGS_INVALID_RESOLUTION              0x0002
+#define GAME_SETTINGS_NO_INTRO                        0x0004
+#define GAME_SETTINGS_NO_LOGO                         0x0008
+#define GAME_SETTINGS_NO_SOUND                        0x0010
+#define GAME_SETTINGS_NO_WALK_SOUND                   0x0020
+#define GAME_SETTINGS_NO_HOUSE_ANIM                   0x0040
+#define GAME_SETTINGS_0080_SKIP_USER_INPUT_THIS_FRAME 0x0080
+#define GAME_SETTINGS_APP_INACTIVE                    0x0100
+#define GAME_SETTINGS_0200_EVENT_TIMER                0x0200
+#define GAME_SETTINGS_0400_MISC_TIMER                 0x0400
+#define GAME_SETTINGS_0800                            0x0800
+#define GAME_SETTINGS_1000                            0x1000
+#define GAME_SETTINGS_2000                            0x2000
+#define GAME_SETTINGS_4000                            0x4000
+extern int dword_6BE364_game_settings_1;  // GAME_SETTINGS_*
+
+#define DEBUG_SETTINGS_RUN_IN_WIDOW     0x0001
+#define DEBUG_SETTINGS_0002_SHOW_FR     0x0002
+#define DEBUG_SETTINGS_NO_ACTORS        0x0004
+#define DEBUG_SETTINGS_NO_DECORATIONS   0x0008
+#define DEBUG_SETTINGS_NO_DAMAGE        0x0010
+extern int dword_6BE368_debug_settings_2; // DEBUG_SETTINGS_*
+
 extern unsigned __int8 bUseLoResSprites;
 extern unsigned __int8 bUseRegistry;
 extern unsigned __int8 bCanLoadFromCD;
@@ -864,7 +887,6 @@
 extern int _702AC0_unused; // weak
 extern int _702AC4_unused; // weak
 extern char _702ACC_unused; // weak
-extern int bDebugResouces; // weak
 extern unsigned int bNoVideo;
 extern bool bNoIntro;
 extern bool bNoLogo;
@@ -963,7 +985,6 @@
 extern struct Texture *pTexture_PlayerFaceDead;
 extern std::array< std::array<struct Texture *, 56>, 4> pTextures_PlayerFaces;
 extern int dword_A75070; // weak
-extern NZIArray<struct Player *, 5> pPlayers;
 extern __int64 qword_A750D8; // weak
 extern enum PlayerSpeech PlayerSpeechID;
 extern int uSpeakingCharacter; // weak
@@ -1112,7 +1133,7 @@
 double __fastcall sub_43AE12(signed int a1);
 int __fastcall _43AFE3_calc_spell_damage(int a1, int a2, signed int a3, int a4);
 void __fastcall sub_43B057(unsigned int uObjID, unsigned int uActorID, struct Vec3_int_ *pVelocity);
-void sub_43B1B0(signed int a1, unsigned int a2, struct Vec3_int_ *pVelocity, signed int a4);
+void ActorDamageFromMonster(signed int attacker_id, unsigned int actor_id, struct Vec3_int_ *pVelocity, signed int a4);
 void CharacterUI_LoadPaperdollTextures();
 int __fastcall GetItemTextureFilename(char *pOut, signed int item_id, int index, int shoulder);
 bool IsDwarfPresentInParty(bool b);
@@ -1203,7 +1224,7 @@
 void UI_CreateEndConversationButton();
 void __fastcall OnSelectShopDialogueOption(signed int uMessageParam);
 int HouseDialogPressCloseBtn();
-bool __fastcall MerchandiseTest(ItemGen *item, int _2da_idx);
+bool MerchandiseTest(ItemGen *item, int _2da_idx);
 void UIShop_Buy_Identify_Repair();
 bool __fastcall IsBModelVisible(unsigned int uModelID, int *unused);
 void ODM_LoadAndInitialize(const char *pLevelFilename, struct ODMRenderParams *thisa);
@@ -1229,7 +1250,7 @@
 void sub_491E3A();
 int CycleCharacter(bool backwards);
 void __fastcall Rest(unsigned int uHoursToSleep);
-int _493938_regenerate();
+void _493938_regenerate();
 void init_summoned_item(struct stru351_summoned_item *_this, __int64 duration);
 void _494035_timed_effects__water_walking_damage__etc();
 unsigned int __fastcall _494820_training_time(unsigned int a1);
--- a/stru298.h	Tue Dec 03 09:22:24 2013 +0600
+++ b/stru298.h	Tue Dec 03 09:22:28 2013 +0600
@@ -14,8 +14,8 @@
   __int16 field_324[100];
   char field_3EC[100];
   char field_450[100];
-  Vec3_int_ vec_4B4;
+  Vec3_int_ vec_4B4[100];
 };
 #pragma pack(pop)
 
-extern stru298 stru_50FE08; // weak
\ No newline at end of file
+extern stru298 AttackerInfo; // weak
\ No newline at end of file