Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. def sendPromotions(this):
  2. for promotion in this.server.shopPromotions:
  3. this.sendPacket(Identifiers.send.Promotion, ByteArray().writeBoolean(False if int(promotion[2]) == 0 else True ).writeBoolean(True).writeInt(promotion[0] * (10000 if promotion[1] > 99 else 100) + promotion[1] + (10000 if promotion[1] > 99 else 0)).writeBoolean(True).writeInt(promotion[3]).writeByte(promotion[2]).toByteArray())
  4.  
  5. if len(this.server.shopPromotions) > 0:
  6. promotion = this.server.shopPromotions[0]
  7. item = promotion[0] * (10000 if promotion[1] > 99 else 100) + promotion[1] + (10000 if promotion[1] > 99 else 0)
  8. this.sendPacket(Identifiers.send.Promotion_Popup, ByteArray().writeByte(promotion[0]).writeByte(promotion[1]).writeByte(promotion[2]).writeShort(this.server.shopBadges.get(item, 0)).toByteArray())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement