1 / 19

游戏物品类

游戏物品类. 任务部 江晓霞. 如何增加一个物品. 数据库(向 cq_itemtype 插入一条记录) 客户端 (相关资源的配置). Monopoly 字段. 该物品的属性: 死亡不会掉落 出售提示 丢弃提示. amount 、 amount_limit. 装备类 amount 物品现有耐久度 amount_limit 物品耐久度上限. amount 、 amount_limit. 可堆叠物品类 Amount , amount_limit 表示物品叠加属性. 与物品相关的资源文件. Ini itemtype.ini

gail-huber
Télécharger la présentation

游戏物品类

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 游戏物品类 任务部 江晓霞

  2. 如何增加一个物品 • 数据库(向cq_itemtype插入一条记录) • 客户端(相关资源的配置)

  3. Monopoly字段 该物品的属性: 死亡不会掉落 出售提示 丢弃提示

  4. amount 、amount_limit • 装备类 • amount 物品现有耐久度 • amount_limit物品耐久度上限

  5. amount 、amount_limit • 可堆叠物品类 • Amount,amount_limit表示物品叠加属性

  6. 与物品相关的资源文件 • Ini\itemtype.ini • Ani\MapItemIcon.ANI • Ani\ItemMinIcon.ANI • data\ItemMinIcon • data\MapItemIcon

  7. Itemtype.ini monster_type 、able_mask 、exp_type在itemtype.ini中不需要配置

  8. MapItemIcon.ANI

  9. ItemMinIcon.ANI

  10. cq_itemtype与cq_item cq_itemtype cq_item • 记录了某一个物品的各种属性 • 相当于类的概念 • 玩家背包的物品的记录 • 相当于实例

  11. 物品相关action操作 • ACTION_ITEM_ADD = 501 • // 添加物品。data=itemtype_id, param="amount amount_limitident gem1 gem2 magic1 magic2 magic3 reduce_dmgadd_lifeanti_monster", param可省略,所有缺省值为0(表示不修改) • 例: • INSERT INTO cq_action VALUES (800027,0,0,501,72000,'');

  12. 物品相关action操作 • ACTION_ITEM_DEL = 502, • // 删除物品。data=itemtype_id, 或者param为物品名 • ACTION_ITEM_CHECK = 503, • // 检测物品。data=itemtype_id, 或者param为物品名 • 例: • INSERT INTO cq_action VALUES • (800027, 800028, 800029,503,72000, ''), • (800028,0,0,502,72000, ''), • (800029,0,0,1010,2005, '对不起,该物品不存在。');

  13. 物品相关action操作 • ACTION_ITEM_MULTIDEL = 506, • // 删除多种物品, param为 "idType0 idType1 num",即删除num个idType0-idType1的物品。 • ACTION_ITEM_MULTICHK = 507, • // 检测多种物品, param为 "idType0 idType1 num",即检测num个idType0-idType1的物品。

  14. 物品相关action操作 • ACTION_ITEM_LEAVESPACE = 508 • // 检查背包剩余空间是否有data数量大小。>=为TRUE。 • 例: • INSERT INTO cq_action VALUES • (800027, 800028, 800029,508,1, ''), • (800028,0,0,501,72000, ''), • (800029,0,0,1010,2005, ‘对不起,背包空间不足。');

  15. 物品相关action操作 • ACTION_USER_EQPCHK = 1065, // 玩家装备检查,判断玩家某个装备位置的装备是否为某种类型。param="pos item_subtype", • // pos为玩家装备位置(1-8),item_subtype为装备物品的子类型(类型的十万位、万位、千位)

  16. 练习 • INSERT INTO cq_action VALUES • (80000,80001,0,507,0,'72000 72000 3'), • (80001,80002,0,506,0,'72000 72000 3'), • (80002,0,0,501,72001,''); • INSERT INTO cq_action VALUES • (80010,80011,80014,508,2,''), • (80011,80012,0,502,72001,''), • (80012,80013,0,501,72000,''), • (80013,0,0,501,72000,''), • (80014,0,0,1010,2005,'对不起,背包空间不足。');

  17. FAQ经典错误 • 1、增加物品时,没有判断背包空间,如果背包已满,执行501对应的action失败。 • 2、使用506删除多个物品时,param=‘idType0 idType1 num’, idType0 必须小于等于idType1 。 • 3、配置itemtype.ini时,没有把amount做调整,导致加密itemtype.ini时失败。 • 4、物品没有显示或显示的信息错误。 • 5、给奖励时最好先删除物品,再给奖励。否则可能导致让玩家反复刷奖励的BUG。

  18. 作业 • 在双龙城放个圣诞老人(200,400),点击后会得到一个圣诞礼包,不可重复得如果身上有则不给。打开礼包得到某3个物品(2个龙珠、1个流星)。

More Related