HeroTakeOnEquipResponseCommand.lua 666 B

12345678910111213141516
  1. local HeroTakeOnEquipResponseCommand = class('HeroTakeOnEquipResponseCommand', framework.SimpleCommand)
  2. function HeroTakeOnEquipResponseCommand:ctor()
  3. end
  4. function HeroTakeOnEquipResponseCommand:execute(notification)
  5. local data = notification:getBody()
  6. SLBridge:onLUAEvent(LUA_EVENT_HERO_TAKE_ON_EQUIP, {isSuccess = data.isSuccess})
  7. if data.isSuccess then -- 穿戴成功
  8. else -- 穿戴失败
  9. global.Facade:sendNotification(global.NoticeTable.HeroBag_Item_Pos_Change)
  10. global.Facade:sendNotification(global.NoticeTable.Bag_Item_Pos_Change)
  11. end
  12. end
  13. return HeroTakeOnEquipResponseCommand