红月论坛

 找回密码
 立即注册
查看: 9519|回复: 1

[技术解析] RMS_LEVEL1000MAIL

[复制链接]
发表于 2020-3-1 14:35:48 | 显示全部楼层 |阅读模式
1000级发信存储解析
  1. ALTER PROCEDURE [dbo].[RMS_LEVEL1000MAIL]
  2.         @GameID varchar(14),
  3.         @Time datetime
  4. AS

  5. set nocount on

  6. declare @updatestoryqueststate_error int, @insertmail_error int

  7. insert tblMail1 (Time, Recipient, Sender, ReadOrNot, Title, Line, Content, Item) values(@Time, @GameID, '[RedMoon]', 0, '[奖励]恭喜您达到1000级!', 13, '
  8. 你已经通过重重考验达到1000级,
  9. 如果想继续提升,需要借助于神秘丹药。
  10. 它能够帮助你到达新的高度。

  11. 你知道在哪能找到我,我在等你.

  12. 卡森', '')

  13. --1000级奖励:生命水X10,钥匙X5,生化箱子X5,毒药X3,石头X1
  14. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 197, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 0, @Time)
  15. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 197, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 0, @Time)
  16. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 197, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 0, @Time)

  17. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 214, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 1, @Time)
  18. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 214, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 1, @Time)
  19. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 214, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 1, @Time)

  20. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 213, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 2, @Time)
  21. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 213, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 2, @Time)
  22. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 213, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 2, @Time)
  23. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 213, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 2, @Time)
  24. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 213, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 2, @Time)

  25. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 67, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 3, @Time)
  26. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 67, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 3, @Time)
  27. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 67, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 3, @Time)

  28. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 196, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 4, @Time)

  29.         select @insertmail_error = @@ERROR

  30.         if @updatestoryqueststate_error = 0 AND @insertmail_error = 0
  31.         begin

  32.                 commit transaction

  33.         end
  34.         else
  35.         begin

  36.                 rollback transaction

  37.         end
复制代码
目前在用的版本,汉化了信件内容,并增加了随邮件发送千级奖励的Insert语句。
  1. insert tblSpecialItem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 196, 4, 2, 1000, 1000, 1000, 1, @GameID, 100, 4, @Time)
复制代码
借这个语句看一下随信发特的要点:
1.物品MiscTime与发信时间一致,此处用了Time变量统一赋值。
2.邮件附件栏的WindowKind是100,WindowIndex从左到右依次为01234共5个格子,如果多种物品刷到一个格子里,会出现叠放,取出一种还有一种的效果。
3.建议用Map,X,Y值来标记所发物品,数据中以用来区分掉落和发放。

最后,再贴个原版。
  1. /****** Object:  Stored Procedure dbo.RMS_LEVEL1000MAIL    Script Date: 2004-5-13 11:21:09 ******/


  2. ALTER PROCEDURE [dbo].[RMS_LEVEL1000MAIL]
  3.         @GameID varchar(14),
  4.         @Time datetime
  5. AS

  6. set nocount on

  7. declare @updatestoryqueststate_error int, @insertmail_error int

  8. insert tblMail1 (Time, Recipient, Sender, ReadOrNot, Title, Line, Content, Item) values(@Time, @GameID, '[Kasham]', 0, 'Legendary Medicine', 13, '
  9. You have struggled through an arduous journey
  10. of self-discovery and personal development that
  11. has honed your skills to a Level of perfection.
  12. But now you must focus your body and spirit into
  13. finding what can only be described as "Legendary
  14. Medicine"; a pill that when taken by one
  15. enlightened as you allows you to develop your
  16. attributes even further. Who knows what you
  17. can achieve!

  18. You know where I am if you need me.

  19. Kasham', '')


  20.         select @insertmail_error = @@ERROR

  21.         if @updatestoryqueststate_error = 0 AND @insertmail_error = 0
  22.         begin

  23.                 commit transaction

  24.         end
  25.         else
  26.         begin

  27.                 rollback transaction

  28.         end
复制代码



学习红月技术,我只来红月论坛!
回复

使用道具 举报

发表于 2021-4-20 12:00:07 | 显示全部楼层
好好学习,天天向上!
学习红月技术,我只来红月论坛!
回复

使用道具 举报

QQ|手机版|小黑屋|红月论坛

GMT+8, 2024-4-20 00:34

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表