示例#1
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushIntoStack(MathUtils.ToNotNullString(actionResult.AchieveName))
    writer.PushShortIntoStack(MathUtils.ToShort(actionResult.AchieveType))
    writer.PushIntoStack(MathUtils.ToNotNullString(actionResult.HeadID))
    writer.PushIntoStack(MathUtils.ToNotNullString(actionResult.AchieveDesc))
    writer.PushShortIntoStack(MathUtils.ToShort(actionResult.IsComplete))
    writer.PushIntoStack(actionResult.CompleteNum)
    writer.PushIntoStack(actionResult.AchieveNum)

    return True
示例#2
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushIntoStack(actionResult.PageCount)
    writer.PushIntoStack(len(actionResult.gameNoticelsit))
    for info in actionResult.gameNoticelsit:
        DsItem = DataStruct()
        DsItem.PushIntoStack(MathUtils.ToNotNullString(info.Title))
        DsItem.PushIntoStack(MathUtils.ToNotNullString(info.Content))
        DsItem.PushIntoStack(MathUtils.ToNotNullString(info.CreateDate))
        writer.PushIntoStack(DsItem)
    return True
示例#3
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushIntoStack(actionResult.ChatMaxNum)
    writer.PushIntoStack(len(actionResult.chatList))
    for info in actionResult.chatList:
        DsItem = DataStruct()
        DsItem.PushIntoStack(info.FromUserID)
        DsItem.PushIntoStack(MathUtils.ToNotNullString(info.FromUserName))
        DsItem.PushIntoStack(info.ChatID)
        DsItem.PushIntoStack(MathUtils.ToNotNullString(info.Content))
        DsItem.PushIntoStack(info.SendDate.ToString("HH:mm:ss"))
        writer.PushIntoStack(DsItem)

    return True
示例#4
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushIntoStack(actionResult.PageCount)
    writer.PushIntoStack(len(actionResult.userRankList))
    for info in actionResult.userRankList:
        wining = PythonHelper.TransformString(info.Wining)
        DsItem = DataStruct()
        DsItem.PushIntoStack(info.RankId)
        DsItem.PushIntoStack(info.UserID)
        DsItem.PushIntoStack(MathUtils.ToNotNullString(info.NickName))
        DsItem.PushIntoStack(info.GameCoin)
        DsItem.PushIntoStack(MathUtils.ToNotNullString(wining))
        writer.PushIntoStack(DsItem)
    return True
示例#5
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushIntoStack(actionResult.CompleteNum)
    writer.PushIntoStack(actionResult.AchieveNum)
    writer.PushIntoStack(actionResult.PageCount)
    writer.PushIntoStack(len(actionResult.AchieveList))
    for info in actionResult.AchieveList:
        isGain = AchieveTask.GetAchieveStatus(actionResult.userID, info.Id)
        dsItem = DataStruct()
        dsItem.PushIntoStack(info.Id)
        dsItem.PushIntoStack(MathUtils.ToNotNullString(info.Name))
        dsItem.PushIntoStack(MathUtils.ToNotNullString(info.HeadIcon))
        dsItem.PushShortIntoStack(MathUtils.ToShort(isGain))
        writer.PushIntoStack(dsItem)

    return True
示例#6
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushShortIntoStack(actionResult.Postion)
    writer.PushIntoStack(MathUtils.ToNotNullString(actionResult.RewardContent))
    writer.PushIntoStack(actionResult.FreeNum)
    writer.PushIntoStack(actionResult.UserCoin)
    writer.PushIntoStack(actionResult.UserGold)
    return True
示例#7
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushIntoStack(len(actionResult.chatList))
    for info in actionResult.chatList:
        DsItem = DataStruct()
        DsItem.PushIntoStack(info.Id)
        DsItem.PushIntoStack(MathUtils.ToNotNullString(info.Content))
        writer.PushIntoStack(DsItem)
    return True
示例#8
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushIntoStack(actionResult.PageCount)
    writer.PushIntoStack(actionResult.GameCoin)
    writer.PushIntoStack(actionResult.GoldNum)
    writer.PushIntoStack(len(actionResult.ShopList))
    for info in actionResult.ShopList:
        dsItem = DataStruct()
        dsItem.PushIntoStack(info.ShopID)
        dsItem.PushIntoStack(MathUtils.ToNotNullString(info.ShopName))
        dsItem.PushIntoStack(MathUtils.ToNotNullString(info.HeadID))
        dsItem.PushIntoStack(info.Price)
        dsItem.PushIntoStack(info.VipPrice)
        dsItem.PushIntoStack(info.GameCoin)
        dsItem.PushIntoStack(MathUtils.ToNotNullString(info.ShopDesc))
        dsItem.PushIntoStack(info.SeqNO)
        writer.PushIntoStack(dsItem)
    return True
示例#9
0
def buildPacket(writer, urlParam, actionResult):
    postion = 0
    writer.PushShortIntoStack(actionResult.IsFree)
    writer.PushIntoStack(actionResult.FreeNum)
    writer.PushIntoStack(len(actionResult.DailList))
    for info in actionResult.DailList:
        postion = MathUtils.Addition(postion, 1)
        Probability = PythonHelper.TransformString(info.Probability)
        dsItem = DataStruct()
        dsItem.PushIntoStack(postion)
        dsItem.PushIntoStack(MathUtils.ToNotNullString(info.HeadID))
        dsItem.PushIntoStack(MathUtils.ToNotNullString(Probability))
        dsItem.PushIntoStack(MathUtils.ToNotNullString(info.ItemDesc))
        dsItem.PushIntoStack(info.GameCoin)
        writer.PushIntoStack(dsItem)
    writer.PushIntoStack(actionResult.UserCoin)
    writer.PushIntoStack(actionResult.UserGold)
    return True
示例#10
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushIntoStack(actionResult.PageCount)
    writer.PushIntoStack(len(actionResult.userItemList))
    for info in actionResult.userItemList:
        itemName = ''
        headID = ''
        shopInfo = ConfigCacheSet[ShopInfo]().FindKey(info.ItemID)
        if shopInfo:
            itemName = shopInfo.ShopName
            headID = shopInfo.HeadID
        dsItem = DataStruct()
        dsItem.PushIntoStack(MathUtils.ToNotNullString(info.UserItemID))
        dsItem.PushIntoStack(info.ItemID)
        dsItem.PushIntoStack(MathUtils.ToNotNullString(itemName))
        dsItem.PushShortIntoStack(MathUtils.ToShort(info.ShopType))
        dsItem.PushIntoStack(info.Num)
        dsItem.PushIntoStack(MathUtils.ToNotNullString(headID))
        writer.PushIntoStack(dsItem)
    return True
示例#11
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushIntoStack(actionResult.goldNum)
    writer.PushIntoStack(actionResult.gameCoin)
    writer.PushIntoStack(actionResult.freeNum)
    writer.PushIntoStack(actionResult.isSale)
    writer.PushIntoStack(actionResult.issTelegrams)
    writer.PushIntoStack(len(actionResult.grayCrystalArray))
    for info in actionResult.grayCrystalArray:
        crystalName = ''
        headID = ''
        crystalQuality = 0
        crystalInfo = ConfigCacheSet[CrystalInfo]().FindKey(info.CrystalID)
        if crystalInfo is not None:
            crystalName = crystalInfo.CrystalName
            headID = crystalInfo.HeadID
            crystalQuality = MathUtils.ToShort(crystalInfo.CrystalQuality)
        DsItem = DataStruct()
        DsItem.PushIntoStack(MathUtils.ToNotNullString(info.UserCrystalID))
        DsItem.PushIntoStack(info.CrystalID)
        DsItem.PushIntoStack(MathUtils.ToNotNullString(crystalName))
        DsItem.PushIntoStack(MathUtils.ToNotNullString(headID))
        DsItem.PushShortIntoStack(crystalQuality)
        writer.PushIntoStack(DsItem)

    writer.PushIntoStack(actionResult.userLightArray.Count)
    for info in actionResult.userLightArray:
        probabilityInfo = ConfigCacheSet[ProbabilityInfo]().FindKey(
            info.HuntingID)
        price = 0
        if probabilityInfo is not None:
            price = probabilityInfo.Price
        DsItem = DataStruct()
        DsItem.PushIntoStack(info.HuntingID)
        DsItem.PushIntoStack(price)
        DsItem.PushIntoStack(info.IsLight)
        writer.PushIntoStack(DsItem)

    writer.PushIntoStack(MathUtils.ToNotNullString(actionResult.prompt))

    return True
示例#12
0
def buildPacket(writer, urlParam, actionResult):
    writer.PushIntoStack(actionResult.PageCount)
    writer.PushIntoStack(len(actionResult.TaskList))
    for info in actionResult.TaskList:
        CompleteNum = 0
        IsReceive = 1
        usertaskInfo = AchieveTask.GetUserTaskInfo(actionResult.userID,info.TaskID)
        if usertaskInfo:
            CompleteNum = usertaskInfo.TaskNum
            if CompleteNum>info.RestraintNum:
                CompleteNum =info.RestraintNum
            IsReceive = MathUtils.ToShort(usertaskInfo.TaskStatus)
        dsItem = DataStruct()
        dsItem.PushIntoStack(info.TaskID)
        dsItem.PushIntoStack(MathUtils.ToNotNullString(info.TaskName))
        dsItem.PushIntoStack(CompleteNum)
        dsItem.PushIntoStack(info.RestraintNum)
        dsItem.PushIntoStack(MathUtils.ToNotNullString(info.TaskDesc))
        dsItem.PushIntoStack(info.GameCoin)
        dsItem.PushShortIntoStack(IsReceive)
        writer.PushIntoStack(dsItem)
    return True