ProtectionAreas: The areas are now read from the DB (once)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1563 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-06-07 20:19:36 +00:00
parent 018adc3153
commit b244f206d5
3 changed files with 58 additions and 14 deletions
@@ -9,9 +9,9 @@
function InitializeHooks(a_Plugin)
local PlgMgr = cRoot:Get():GetPluginManager();
PlgMgr:AddHook(a_Plugin, cPluginManager.HOOK_DISCONNECT);
PlgMgr:AddHook(a_Plugin, cPluginManager.HOOK_PLAYER_JOINED);
PlgMgr:AddHook(a_Plugin, cPluginManager.HOOK_PLAYER_LEFT_CLICK);
PlgMgr:AddHook(a_Plugin, cPluginManager.HOOK_PLAYER_RIGHT_CLICK);
PlgMgr:AddHook(a_Plugin, cPluginManager.HOOK_PLAYER_SPAWNED);
end
@@ -33,7 +33,7 @@ end;
function OnPlayerJoined(a_Player)
function OnPlayerSpawned(a_Player)
-- Create a new cPlayerAreas object for this player
if (g_PlayerAreas[a_Player:GetUniqueID()] == nil) then
LoadPlayerAreas(a_Player);