TakeOnEquipResponseCommand.lua 616 B

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