Andy, Lorne, Xizhi, Let us design bag and item system here ---+++ Draft thought of Xizhi Global Store | ID | int , *Unique Indexed* | | PrimeKey | asset string key like url path *Unique Indexed* | | FileID | nil, reference a remote paraworld file where this item can be downloaded safely | | type | like AppCommand, APP, Model asset, texture asset, character asset, Bag, Item | | category | virtual folder: like model/char, char/v3/assets. similar to PrimeKey. for human categorization. | | Count | how many are left in store. nil for infinity. | | Author | userID who uploaded | | UploadDate | date | | Icon | the icon to display. can be local or URL path. | ---+++ 编辑上传到Global Store的流程 Disk(Art Model browser) --> Scene --> Global Store (-->bag) 引入了一个Global Store, 好像是Template, 它可以被实例化到某个Bag中最多Count次, 每次实例化要消耗Price元。 背包中的物品,好像是类的实例了。 Andy: my latest concern is the item system should be separated to two catrgories: traditional MMORPG like item system with official functions and model publishing systems that opens the user generated contents. <br/> Xizhi: 我想分成的两部分,是否可以用GlobalStore中的Type来区分呢?<br/> 我是这样考虑处理MMO的物品,和UGC的物品的: Global Store 只记录上面写的内容。 没有那些影响人物的属性等等参数。然后通过Type: 每个Type有自己的表来描述各自的属性。 比如MMO是一种表, UGC是一种表。甚至一些Type的属性表,可以每个Server独立维护的。 CentralAPI上只存GlobalStore一张很简单的表。可以满足显示( icon) 和交易(Price)。 注:这里将GlobalStore到官方的背包(商城)的过程也看成一种交易。比如我们在后台为每个Server的商城背包补充物品等。 ---+++ 背包的种类 %T% : 背包中的物品一般都是从GlobalStore中移入的 Global Store --> 某一个背包中 | 官方的背包 | Market Place| | 个人的背包 | Inventory : with hierachy | | 世界的背包 | 仓库 | ---+++ Trasactions的种类 | paraworld.bag.GetBag|| | paraworld.bag.BuyItems|| | paraworld.bag.SwapItems|| | paraworld.bag.SendItems|| | paraworld.bag.DestroyItems|| | paraworld.store.GetItems|| | paraworld.store.ManageItem|| * * * * * * -------------------------------------------------------------------------------------------------------------------------- * * * * * ---+!! =paraworld.bag.GetBag= <div style="float: right; margin: 5px; width: 250px; color: #4e5155; background-color: #f0eded; border: #ccc 1px solid; padding: 5px"> *Contents* %TOC% </div> ---++ Description 取得指定用户所拥有的所有背包 ---++ Parameters |*Required*|*Name*|*Type*|*Description*| |<font color="#4682b4">required</font>|sessionKey|%BLUE%string%ENDCOLOR%|用户凭证。| |<font color="#4682b4">optional</font>|format|%BLUE%int%ENDCOLOR%|返回的数据格式(0:XML 1:JSON),默认值为0| ---++ Example Return XML <verbatim> <msg xmlns=""> </msg> </verbatim> ---++ Example Return JSON <verbatim> </verbatim> ---++ Error Codes 当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。 查看完整的[[ErrorCodes][Error Code]] ---++ Test Cases ---+++!! case 1 Input: <verbatim> { } </verbatim> _Result_: <verbatim> { } </verbatim> * * * * * * * * -------------------------------------------------------------------------------------------------------------------------- * * * * * * ---+!! =paraworld.items.Create= <div style="float: right; margin: 5px; width: 250px; color: #4e5155; background-color: #f0eded; border: #ccc 1px solid; padding: 5px"> *Contents* %TOC% </div> ---++ Description 创建一个物品 ---++ Parameters |*Required*|*Name*|*Type*|*Description*| |<font color="#4682b4">optional</font>|format|%BLUE%int%ENDCOLOR%|返回的数据格式(0:XML 1:JSON),默认值为0| |<font color="#4682b4">required</font>|sessionKey|%BLUE%string%ENDCOLOR%|用户凭证。| |^|AssetKey|%BLUE%string%ENDCOLOR%| 不能大于200个字符 | |^|AssetFile|%BLUE%string%ENDCOLOR%| | |^|Category|%BLUE%string%ENDCOLOR%| | |^|Count|%BLUE%int%ENDCOLOR%| | |^|Icon|%BLUE%string%ENDCOLOR%| | |^|PBuyPrice|%BLUE%int%ENDCOLOR%| | |^|EBuyPrice|%BLUE%int%ENDCOLOR%| | |^|PSellPrice|%BLUE%int%ENDCOLOR%| | |^|ESellPrice|%BLUE%int%ENDCOLOR%| | |^|Name|%BLUE%string%ENDCOLOR%| | |^|Type|%BLUE%byte%ENDCOLOR%| 1:item_template;2:app_template;3:appcommand_template;4:model_asset_template;5:texture_asset_template;6:character_asset_template;7:animation_asset_template | if Type == 1 (item_template) |<font color="#4682b4">required</font>|Brand|%BLUE%byte%ENDCOLOR%| | |^|Brandcode|%BLUE%short%ENDCOLOR%| | |^|Expiredays|%BLUE%short%ENDCOLOR%| | |^|Class|%BLUE%string%ENDCOLOR%| | |^|Quality|%BLUE%byte%ENDCOLOR%| | |^|InventoryType|%BLUE%byte%ENDCOLOR%| | |^|AllowableGender|%BLUE%byte%ENDCOLOR%| | |^|RequiredContribution|%BLUE%int%ENDCOLOR%| | |^|RequiredTitle|%BLUE%string%ENDCOLOR%| | |^|MaxCount|%BLUE%short%ENDCOLOR%| | |^|ContainerSlots|%BLUE%short%ENDCOLOR%| | |^|Stats|%BLUE%string%ENDCOLOR%| 多个stat之间用英文竖线分隔,stat的键与值之间用英文逗号“,”分隔,例如:1,10|2,20|3,30 | |^|Stackable|%BLUE%short%ENDCOLOR%| | |^|Delay|%BLUE%int%ENDCOLOR%| | |^|Spellid|%BLUE%int%ENDCOLOR%| | |^|Spellcooldown|%BLUE%int%ENDCOLOR%| | |^|Spellcharges|%BLUE%int%ENDCOLOR%| | |^|Binding|%BLUE%byte%ENDCOLOR%| 0:no bound;1:binds when used;2:binds when equiped;3:binds when picked up;4:quest item | |^|Description|%BLUE%string%ENDCOLOR%| | |^|Startquest|%BLUE%int%ENDCOLOR%| | |^|Material|%BLUE%byte%ENDCOLOR%| | |^|Itemset|%BLUE%int%ENDCOLOR%| | |^|MaxComfortability|%BLUE%int%ENDCOLOR%| | |^|BagFamily|%BLUE%short%ENDCOLOR%| | |^|Duration|%BLUE%int%ENDCOLOR%| | if Type == 2 (app_template) |<font color="#4682b4">required</font>|URL|%BLUE%string%ENDCOLOR%| | |^|AppKey|%BLUE%string%ENDCOLOR%| | if Type == 3 (appcommand_template) |<font color="#4682b4">required</font>|URL|%BLUE%string%ENDCOLOR%| | |^|AppKey|%BLUE%string%ENDCOLOR%| | |^|CommandName|%BLUE%string%ENDCOLOR%| | |^|Param|%BLUE%string%ENDCOLOR%| | if Type == 4 (model_asset_template) |<font color="#4682b4">required</font>|Description|%BLUE%string%ENDCOLOR%| | |^|Author|%BLUE%GUID%ENDCOLOR%| | |^|IsBcscomponent|%BLUE%bool%ENDCOLOR%| | |^|Component|%BLUE%byte%ENDCOLOR%| | if Type == 5 (texture_asset_template) |<font color="#4682b4">required</font>|Description|%BLUE%string%ENDCOLOR%| | |^|Author|%BLUE%GUID%ENDCOLOR%| | if Type == 6 (character_asset_template) |<font color="#4682b4">required</font>|Description|%BLUE%string%ENDCOLOR%| | |^|Author|%BLUE%GUID%ENDCOLOR%| | |^|IsCustomcharacter|%BLUE%bool%ENDCOLOR%| | |^|IsSupportcartoonface|%BLUE%bool%ENDCOLOR%| | |^|Gender|%BLUE%byte%ENDCOLOR%| | if Type == 7 (animation_asset_template) |<font color="#4682b4">required</font>|Description|%BLUE%string%ENDCOLOR%| | |^|Author|%BLUE%GUID%ENDCOLOR%| | ---++ Example Return XML <verbatim> <msg xmlns=""> </msg> </verbatim> ---++ Example Return JSON <verbatim> </verbatim> ---++ Error Codes 当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。 查看完整的[[ErrorCodes][Error Code]] ---++ Test Cases ---+++!! case 1 Input: <verbatim> { } </verbatim> _Result_: <verbatim> { } </verbatim> * * * * * * * * -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * * * * * ---+!! =paraworld.items.Delete= <div style="float: right; margin: 5px; width: 250px; color: #4e5155; background-color: #f0eded; border: #ccc 1px solid; padding: 5px"> *Contents* %TOC% </div> ---++ Description 依主键删除一个物品 ---++ Parameters |*Required*|*Name*|*Type*|*Description*| |<font color="#4682b4">required</font>|sessionKey|%BLUE%string%ENDCOLOR%|用户凭证。| |^|GSID|%BLUE%int%ENDCOLOR%| 物品主键ID | |^|Type|%BLUE%byte%ENDCOLOR%| 被删除的物品所属的类别,1:item_template;2:app_template;3:appcommand_template;4:model_asset_template;5:texture_asset_template;6:character_asset_template;7:animation_asset_template | |<font color="#4682b4">optional</font>|format|%BLUE%int%ENDCOLOR%|返回的数据格式(0:XML 1:JSON),默认值为0| ---++ Example Return XML <verbatim> <msg xmlns=""> </msg> </verbatim> ---++ Example Return JSON <verbatim> </verbatim> ---++ Error Codes 当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。 查看完整的[[ErrorCodes][Error Code]] ---++ Test Cases ---+++!! case 1 Input: <verbatim> { } </verbatim> _Result_: <verbatim> { } </verbatim> * * * * * * * ----------------------------------------------------------------------------------------------------------------------------------------------------- * * * * * * ---+!! =paraworld.items.Update= <div style="float: right; margin: 5px; width: 250px; color: #4e5155; background-color: #f0eded; border: #ccc 1px solid; padding: 5px"> *Contents* %TOC% </div> ---++ Description 更新指定的物品 ---++ Parameters |*Required*|*Name*|*Type*|*Description*| |<font color="#4682b4">optional</font>|format|%BLUE%int%ENDCOLOR%|返回的数据格式(0:XML 1:JSON),默认值为0| |<font color="#4682b4">required</font>|sessionKey|%BLUE%string%ENDCOLOR%|用户凭证。| |^|GSID|%BLUE%int%ENDCOLOR%| 被修改的物品的主键ID | |^|Type|%BLUE%byte%ENDCOLOR%| 被修改的物品的Type值,不可修改,1:item_template;2:app_template;3:appcommand_template;4:model_asset_template;5:texture_asset_template;6:character_asset_template;7:animation_asset_template | |<font color="#4682b4">optional</font>|AssetFile|%BLUE%string%ENDCOLOR%| 不能大于200个字符 | |^|Category|%BLUE%string%ENDCOLOR%| | |^|Count|%BLUE%int%ENDCOLOR%| | |^|Icon|%BLUE%string%ENDCOLOR%| | |^|PBuyPrice|%BLUE%int%ENDCOLOR%| | |^|EBuyPrice|%BLUE%int%ENDCOLOR%| | |^|PSellPrice|%BLUE%int%ENDCOLOR%| | |^|ESellPrice|%BLUE%int%ENDCOLOR%| | |^|Name|%BLUE%string%ENDCOLOR%| | |^|UpdatePriority|%BLUE%byte%ENDCOLOR%| 依据此值更新版本号,0:第三位版本号revision,1:更新第二位版本号minor,2:更新第一位版本号major,默认值为0 | if Type == 1 (item_template) |<font color="#4682b4">optional</font>|Brand|%BLUE%byte%ENDCOLOR%| | |^|Brandcode|%BLUE%short%ENDCOLOR%| | |^|Expiredays|%BLUE%short%ENDCOLOR%| | |^|Class|%BLUE%string%ENDCOLOR%| | |^|Quality|%BLUE%byte%ENDCOLOR%| | |^|InventoryType|%BLUE%byte%ENDCOLOR%| | |^|AllowableGender|%BLUE%byte%ENDCOLOR%| | |^|RequiredContribution|%BLUE%int%ENDCOLOR%| | |^|RequiredTitle|%BLUE%string%ENDCOLOR%| | |^|MaxCount|%BLUE%short%ENDCOLOR%| | |^|ContainerSlots|%BLUE%short%ENDCOLOR%| | |^|Stats|%BLUE%string%ENDCOLOR%| | |^|Stackable|%BLUE%short%ENDCOLOR%| | |^|Delay|%BLUE%int%ENDCOLOR%| | |^|Spellid|%BLUE%int%ENDCOLOR%| | |^|Spellcooldown|%BLUE%int%ENDCOLOR%| | |^|Spellcharges|%BLUE%int%ENDCOLOR%| | |^|Binding|%BLUE%byte%ENDCOLOR%| | |^|Description|%BLUE%string%ENDCOLOR%| | |^|Startquest|%BLUE%int%ENDCOLOR%| | |^|Material|%BLUE%byte%ENDCOLOR%| | |^|Itemset|%BLUE%int%ENDCOLOR%| | |^|MaxComfortability|%BLUE%int%ENDCOLOR%| | |^|BagFamily|%BLUE%short%ENDCOLOR%| | |^|Duration|%BLUE%int%ENDCOLOR%| | if Type == 2 (app_template) |<font color="#4682b4">optional</font>|URL|%BLUE%string%ENDCOLOR%| | |^|AppKey|%BLUE%string%ENDCOLOR%| | if Type == 3 (appcommand_template) |<font color="#4682b4">required</font>|URL|%BLUE%string%ENDCOLOR%| | |^|AppKey|%BLUE%string%ENDCOLOR%| | |^|CommandName|%BLUE%string%ENDCOLOR%| | |^|Param|%BLUE%string%ENDCOLOR%| | if Type == 4 (model_asset_template) |<font color="#4682b4">optional</font>|Description|%BLUE%string%ENDCOLOR%| | |^|IsBcscomponent|%BLUE%bool%ENDCOLOR%| | |^|Component|%BLUE%byte%ENDCOLOR%| | if Type == 5 (texture_asset_template) |<font color="#4682b4">optional</font>|Description|%BLUE%string%ENDCOLOR%| | if Type == 6 (character_asset_template) |<font color="#4682b4">optional</font>|Description|%BLUE%string%ENDCOLOR%| | |^|Author|%BLUE%GUID%ENDCOLOR%| | |^|IsCustomcharacter|%BLUE%bool%ENDCOLOR%| | |^|IsSupportcartoonface|%BLUE%bool%ENDCOLOR%| | |^|Gender|%BLUE%byte%ENDCOLOR%| | if Type == 7 (animation_asset_template) |<font color="#4682b4">optional</font>|Description|%BLUE%string%ENDCOLOR%| | ---++ Example Return XML <verbatim> <msg xmlns=""> </msg> </verbatim> ---++ Example Return JSON <verbatim> </verbatim> ---++ Error Codes 当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。 查看完整的[[ErrorCodes][Error Code]] ---++ Test Cases ---+++!! case 1 Input: <verbatim> { } </verbatim> _Result_: <verbatim> { } </verbatim> * * * * * * * --------------------------------------------------------------------------------------------------------------------------------------------------- * * * * * * * ---+!! =paraworld.items.Approve= <div style="float: right; margin: 5px; width: 250px; color: #4e5155; background-color: #f0eded; border: #ccc 1px solid; padding: 5px"> *Contents* %TOC% </div> ---++ Description 将指定的物品标记为已通过审核(只有指定的角色成员才可使用此功能) ---++ Parameters |*Required*|*Name*|*Type*|*Description*| |<font color="#4682b4">required</font>|sessionKey|%BLUE%string%ENDCOLOR%|用户凭证。| |^|GSID|%BLUE%int%ENDCOLOR%| 物品主键ID | |<font color="#4682b4">optional</font>|format|%BLUE%int%ENDCOLOR%|返回的数据格式(0:XML 1:JSON),默认值为0| ---++ Example Return XML <verbatim> <msg xmlns=""> </msg> </verbatim> ---++ Example Return JSON <verbatim> </verbatim> ---++ Error Codes 当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。 查看完整的[[ErrorCodes][Error Code]] ---++ Test Cases ---+++!! case 1 Input: <verbatim> { } </verbatim> _Result_: <verbatim> { } </verbatim> * * * * * * * * -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * * * * * ---+!! =paraworld.items.Read= <div style="float: right; margin: 5px; width: 250px; color: #4e5155; background-color: #f0eded; border: #ccc 1px solid; padding: 5px"> *Contents* %TOC% </div> ---++ Description 取得指定的物品的详细数据 ---++ Parameters |*Required*|*Name*|*Type*|*Description*| |<font color="#4682b4">required</font>|GSID|%BLUE%int%ENDCOLOR%|物品ID| |^|Type|%BLUE%byte%ENDCOLOR%| 物品类别,1:item_template;2:app_template;3:appcommand_template;4:model_asset_template;5:texture_asset_template;6:character_asset_template;7:animation_asset_template | |<font color="#4682b4">optional</font>|format|%BLUE%int%ENDCOLOR%|返回的数据格式(0:XML 1:JSON),默认值为0| ---++ Example Return XML <verbatim> <msg> <GSID type="double">4</GSID> <Type type="byte">5</Type> <AssetKey type="string">http://asset.pala5.cn/Texture/MainMenu_Btn_32bits.png</AssetKey> <AssetFile type="string">http://asset.pala5.cn/Texture/Aquarius/Desktop/MainMenu_Btn_32bits.png</AssetFile> <IsApproved type="boolean">False</IsApproved> <Category type="string">model/char</Category> <Count type="double">0</Count> <Icon type="string">Texture/Aquarius/Desktop/MainMenu_Btn_32bits.png</Icon> <PBuyPrice type="double">123</PBuyPrice> <EBuyPrice type="double">124</EBuyPrice> <PSellPrice type="double">125</PSellPrice> <ESellPrice type="double">126</ESellPrice> <Batched type="double">0</Batched> <Name type="string">test</Name> <Version type="string">1.0.0</Version> <Description type="string">Main menu button</Description> <Author type="string">6ea770c6-92b2-4b2b-86da-6f574641ec11</Author> <UploadDate type="string">2009-2-20 19:56:27</UploadDate> <ModifyDate type="string">2009-2-20 19:56:27</ModifyDate> <ID type="double">2</ID> </msg> </verbatim> ---++ Example Return JSON <verbatim> {"GSID":4,"Type":5,"AssetKey":"http://asset.pala5.cn/Texture/MainMenu_Btn_32bits.png", "AssetFile":"http://asset.pala5.cn/Texture/Aquarius/Desktop/MainMenu_Btn_32bits.png", "IsApproved":false,"Category":"model/char","Count":0, "Icon":"Texture/Aquarius/Desktop/MainMenu_Btn_32bits.png","PBuyPrice":123, "EBuyPrice":124,"PSellPrice":125,"ESellPrice":126,"Batched":0,"Name":"test", "Version":"1.0.0","Description":"Main menu button", "Author":"6ea770c6-92b2-4b2b-86da-6f574641ec11","UploadDate":"2009-2-20 19:56:27", "ModifyDate":"2009-2-20 19:56:27","ID":2} </verbatim> ---++ Error Codes 当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。 查看完整的[[ErrorCodes][Error Code]] ---++ Test Cases ---+++!! case 1 Input: <verbatim> { } </verbatim> _Result_: <verbatim> { } </verbatim>
Edit
|
Attach
|
P
rint version
|
H
istory
:
r12
<
r11
<
r10
<
r9
<
r8
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r10 - 2009-02-23
-
CaoYF
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
简体中文
簡體中文
Edit
Attach
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