---++!! !JGSL_history %TOC{title="Contents:"}% %STARTINCLUDE% ---++ JGSL Grid (grid server) | *Title* | JGSL Grid (grid server) | | *Author(s)* | LiXizhi | | *Date* | 2008/8/3 | | *File* | script/kids/3DMapSystemNetwork/JGSL_history.lua | ---+++ Description %T% __Sample Code__ <verbatim> NPL.load("(gl)script/kids/3DMapSystemNetwork/JGSL_history.lua"); local history = Map3DSystem.JGSL.history:new(); </verbatim> ---+++ Member Functions ---++++ !history:clear clear all history. call this function when a server restart. __syntax__ <verbatim>function history:clear()</verbatim> ---++++ !history:GetTotalCount add the total number of creations and env changes. __syntax__ <verbatim>function history:GetTotalCount()</verbatim> ---++++ !history:AddCreations when the server receives some client updates that contains creations, it will save all clients' creations to an array. At normal update time, the server will broadcast previous creations to the clients. * _param_ __creations__ : an array of creation history * _param_ __fromJID__ : who added this creations. __syntax__ <verbatim>function history:AddCreations(creations, fromJID)</verbatim> __parameters__ | *creations* | an array of creation history | | *fromJID* | | ---++++ !history:AddEnvs when the server receives some client updates that contains env updates, it will save all clients' creations to an array. At normal update time, the server will broadcast previous envs to the clients. * _param_ __env__ : an array of env history * _param_ __fromJID__ : who added this env. __syntax__ <verbatim>function history:AddEnvs(env, fromJID)</verbatim> __parameters__ | *env* | an array of env history | | *fromJID* | | ---++++ !history:GetCreationsForClientAgent get an array of creations from the server creation history. * _param_ __agent__ : the agent for whom creations will be retrieved. In fact, it will return all creations who time is larger than agent.LastCreationHistoryTime, and whose agent.fromJID is different from the one in creation history. * _param_ __MaxCount__ : nil or max number of creations to return. This prevents sending too many in a single message. * _return_ ____ : return nil or an array of creations for sending back to the client agent __syntax__ <verbatim>function history:GetCreationsForClientAgent(agent, MaxCount)</verbatim> __parameters__ | *agent* | the agent for whom creations will be retrieved. In fact, it will return all creations who time is larger than agent.LastCreationHistoryTime, and whose agent.fromJID is different from the one in creation history. | | *MaxCount* | | | *return* | return nil or an array of creations for sending back to the client agent | ---++++ !history:GetEnvsForClientAgent get an array of creations from the server creation history. * _param_ __agent__ : the agent for whom creations will be retrieved. In fact, it will return all creations who time is larger than agent.LastEnvHistoryTime, and whose agent.fromJID is different from the one in creation history. * _param_ __MaxCount__ : nil or max number of creations to return. This prevents sending too many in a single message. * _return_ ____ : return nil or an array of creations for sending back to the client agent __syntax__ <verbatim>function history:GetEnvsForClientAgent(agent, MaxCount)</verbatim> __parameters__ | *agent* | the agent for whom creations will be retrieved. In fact, it will return all creations who time is larger than agent.LastEnvHistoryTime, and whose agent.fromJID is different from the one in creation history. | | *MaxCount* | | | *return* | return nil or an array of creations for sending back to the client agent | %STOPINCLUDE%
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2008-02-29
-
LiXizhi
Home
Site map
CCWeb web
HaqiTeen web
Main web
ParaEngine web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
导航页WebTopMenu
Preferences
开发指南
Getting Started
ParacraftSDK
NPL
MCML
NPL Reference Manual
美术Mod
Account
Log In
English
简体中文
簡體中文
E
dit
A
ttach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback