本文整理汇总了C#中ZyGames.Framework.Game.Service.DataStruct.PushIntoStack方法的典型用法代码示例。如果您正苦于以下问题:C# DataStruct.PushIntoStack方法的具体用法?C# DataStruct.PushIntoStack怎么用?C# DataStruct.PushIntoStack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZyGames.Framework.Game.Service.DataStruct
的用法示例。
在下文中一共展示了DataStruct.PushIntoStack方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildPacket
public override void BuildPacket()
{
PushIntoStack(worshipLv);
PushIntoStack(itemName.ToNotNullString());
PushIntoStack(worshipInfo == null ? 0 : worshipInfo.ItemNum);
PushIntoStack(worshipInfo == null ? 0 : worshipInfo.GameCoin);
PushIntoStack(worshipInfo == null ? 0 : worshipInfo.ObtainNum);
PushIntoStack(TrumpHelper.IsUpWorshLv(ContextUser) ? (short)1 : (short)0);
PushIntoStack(worshipInfoInfoArray.Length);
int propertycount = 0;
foreach (var item in worshipInfoInfoArray)
{
short isFull = 0;
GeneralProperty property = GetPropertyType(ContextUser.UserID, propertycount);
if (property != null && property.AbilityLv >= TrumpPropertyInfo.MaxTrumpPropertyLv)
{
isFull = 1;
}
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(property == null ? 0 : (int)property.AbilityType);
dsItem.PushIntoStack(property == null ? (short)0 : (short)property.AbilityLv);
dsItem.PushIntoStack(totalNum > propertycount ? (short)1 : (short)0);
dsItem.PushIntoStack(worshipLv >= item.WorshipLv ? (short)1 : (short)0);
dsItem.PushIntoStack(isFull);
PushIntoStack(dsItem);
propertycount++;
}
this.PushIntoStack((short)isItem);
this.PushIntoStack((short)isCoin);
this.PushIntoStack((short)isObtain);
PushIntoStack(successNum.ToNotNullString());
}
示例2: BuildPacket
public override void BuildPacket()
{
PushIntoStack(isSuccess);
PushIntoStack(memberArray.Count);
foreach (GuildMember member in memberArray)
{
UserCacheGlobal.CheckLoadUser(member.UserID);
GameUser gameUser = new PersonalCacheStruct<GameUser>().FindKey(member.UserID);
UserGeneral general = UserGeneral.GetMainGeneral(member.UserID);
int isHelp = 0;
if (member.DevilNum > 1)
{
isHelp = 1;
}
else
{
isHelp = 2;
}
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(member.UserID);
dsItem.PushIntoStack(gameUser == null ? string.Empty : gameUser.NickName.ToNotNullString());
dsItem.PushIntoStack(general == null ? string.Empty : general.HeadID.ToNotNullString());
dsItem.PushIntoStack(isHelp);
PushIntoStack(dsItem);
}
PushIntoStack(currNum);
PushIntoStack(isPilgrimage);
PushIntoStack(chaoShengNum);
}
示例3: BuildPacket
public override void BuildPacket()
{
PushIntoStack(pageCount);
PushIntoStack(memberArray.Count);
foreach (GuildMember member in memberArray)
{
GameUser gameUser = UserCacheGlobal.CheckLoadUser(member.UserID);
int isOnline = 0;
if (gameUser != null && gameUser.IsOnline)
{
isOnline = 1;
}
else
{
isOnline = 2;
}
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(member.UserID);
dsItem.PushIntoStack(gameUser == null ? string.Empty : gameUser.NickName.ToNotNullString());
dsItem.PushIntoStack(gameUser == null ? LanguageManager.GetLang().shortInt : gameUser.UserLv);
dsItem.PushIntoStack((short)member.PostType);
dsItem.PushIntoStack(gameUser == null ? 0 : gameUser.RankID);
dsItem.PushIntoStack(member.Contribution);
dsItem.PushIntoStack(member.TotalContribution);
dsItem.PushIntoStack(gameUser == null ? string.Empty : gameUser.LoginTime.ToString("t"));
dsItem.PushIntoStack(isOnline);
PushIntoStack(dsItem);
}
}
示例4: BuildPacket
public override void BuildPacket()
{
PushIntoStack(_pageCount);
PushIntoStack(ContextUser.GameCoin);
PushIntoStack(ContextUser.GoldNum);
PushIntoStack(_mallItemsInfoArray.Count);
foreach (MallItemsInfo mallItems in _mallItemsInfoArray)
{
ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(mallItems.ItemID);
int mallPrice = 0;
int specilPrice = 0;
if (itemInfo != null)
{
mallPrice = mallItems.Price;
if (mallItems.MallType == ShopType.Props || mallItems.MallType == ShopType.PresendBox)
{
mallPrice = (FestivalHelper.StoreDiscount() * mallPrice).ToInt();
}
specilPrice = mallItems.SpecialPrice;
}
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(mallItems.ItemID);
dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.MaxHeadID.ToNotNullString());
dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemDesc.ToNotNullString());
dsItem.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : (short)itemInfo.QualityType);
dsItem.PushIntoStack(mallPrice);
dsItem.PushIntoStack(specilPrice);
dsItem.PushIntoStack(mallItems.SeqNO);
dsItem.PushIntoStack((short)_commandType);
PushIntoStack(dsItem);
}
PushIntoStack(ContextUser.ObtainNum);
}
示例5: BuildPacket
public override void BuildPacket()
{
PushIntoStack(moreTeam.MorePlot.PlotID);
PushIntoStack(moreTeam.MorePlot.PlotName.ToNotNullString());
PushIntoStack(moreTeam.UserList.Count);
PushIntoStack(PlotTeamCombat.TeamMaxPeople);
PushIntoStack(moreTeam.MorePlot.ItemId);
PushIntoStack(moreTeam.MorePlot.ItemName.ToNotNullString());
PushIntoStack(moreTeam.MorePlot.ItemNum);
PushIntoStack(moreTeam.MorePlot.ExpNum);
PushIntoStack(moreTeam.TeamUser != null && moreTeam.TeamUser.UserId.ToNotNullString().Equals(Uid) ? 1 : 0);
PushIntoStack(moreTeam.Status);
PushIntoStack(moreTeam.UserList.Count);
foreach (var teamUser in moreTeam.UserList)
{
var gameUser = new GameDataCacheSet<GameUser>().FindKey(teamUser.UserId);
UserGeneral general = UserGeneral.GetMainGeneral(teamUser.UserId);
CareerInfo careerInfo = null;
if (general != null)
{
careerInfo = new ConfigCacheSet<CareerInfo>().FindKey(general.CareerID);
}
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(teamUser.UserId);
dsItem.PushIntoStack(teamUser.NickName.ToNotNullString());
dsItem.PushIntoStack(careerInfo == null ? 0 : (int)careerInfo.CareerID);
dsItem.PushIntoStack(careerInfo == null ? string.Empty : careerInfo.CareerName.ToNotNullString());
dsItem.PushIntoStack(gameUser == null ? (short)0 : gameUser.UserLv);
PushIntoStack(dsItem);
}
}
示例6: BuildPacket
public override void BuildPacket()
{
PushIntoStack(bossPlotID);
PushIntoStack(_guild == null ? (short)0 : _guild.GuildBossInfo.BossLv);
PushIntoStack(_guild == null ? 0 : _guild.ColdTime);
PushIntoStack(_regNum);
PushIntoStack(_guild == null ? (short)0 : _guild.CombatStatus.ToShort());
PushIntoStack((_inspirePercent * 100).ToInt());
PushIntoStack(_reLiveNum);
PushIntoStack(_bossUserList.Count);
foreach (BossUser bossUser in _bossUserList)
{
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(bossUser.NickName.ToNotNullString());
UserGeneral userGeneral = UserGeneral.GetMainGeneral(bossUser.UserId);
dsItem.PushIntoStack(userGeneral == null ? string.Empty : userGeneral.HeadID.ToNotNullString());
dsItem.PushIntoStack(bossUser.IsRelive ? 0 : 1);
dsItem.PushIntoStack(bossUser.CodeTime);
dsItem.PushIntoStack(NoviceHelper.IsWingFestivalInfo(bossUser.UserId) ? (short)1 : (short)0);
dsItem.PushIntoStack(0);
PushIntoStack(dsItem);
}
PushIntoStack((_reliveInspirePercent * 100).ToInt());
}
示例7: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(pageCount);
this.PushIntoStack(userItemArray.Count);
foreach (UserItemInfo item in userItemArray)
{
ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(item.ItemID);
DataStruct dsItem = new DataStruct();
int mallPrice = 0;
if (itemInfo != null && itemInfo.ItemType == ItemType.ZhuangBei)
{
mallPrice = UserHelper.StrongEquPayPrice(Uid, item.UserItemID);
}
else if (itemInfo != null)
{
mallPrice = ((itemInfo.SalePrice) * item.Num / 4);
}
dsItem.PushIntoStack(item.UserItemID.ToNotNullString());
dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
dsItem.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : (short)itemInfo.QualityType);
dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
dsItem.PushIntoStack(mallPrice);
PushIntoStack(dsItem);
}
PushIntoStack(ContextUser.GameCoin);
PushIntoStack(ContextUser.GoldNum);
}
示例8: BuildPacket
public override void BuildPacket()
{
PushIntoStack(pageCount);
PushIntoStack(_itemCount);
PushIntoStack(_gridNum);
PushIntoStack(ContextUser.GameCoin);
PushIntoStack(ContextUser.GoldNum);
PushIntoStack(mlist.Count);
foreach (UserItemInfo item in mlist)
{
DataStruct ds = new DataStruct();
ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(item.ItemID);
ds.PushIntoStack(item.UserItemID.ToNotNullString());
ds.PushIntoStack(itemInfo == null ? 0 : itemInfo.ItemID);
ds.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : (short)itemInfo.ItemType);
ds.PushIntoStack(item.Num);
ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
ds.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : itemInfo.PropType);
ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemDesc.ToNotNullString());
ds.PushIntoStack(itemInfo == null ? 0 : itemInfo.SalePrice);
ds.PushIntoStack(itemInfo == null ? 0 : itemInfo.IsUse ? 1 : 0);
ds.PushIntoStack(itemInfo == null ? 0 : itemInfo.IsCostly ? 1 : 0);
ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.MaxHeadID);
ds.PushIntoStack(itemInfo == null ? 0 : itemInfo.PropType != 15 ? 0 : ItemUseHelper.ItemNum(ContextUser.UserID, itemInfo.EffectNum) <= 0 ? 0 : 1);
PushIntoStack(ds);
}
}
示例9: BuildPacket
public override void BuildPacket()
{
PushIntoStack(codeTime);
PushIntoStack(ContextUser.GameCoin);
PushIntoStack(ContextUser.GoldNum);
PushIntoStack(mysteryShopsList.Count);
foreach (MysteryShops shops in mysteryShopsList)
{
ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(shops.ItemID);
int mallPrice = 0;
if (itemInfo != null)
{
mallPrice = itemInfo.MysteryPrice;
}
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(shops.ItemID);
dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
dsItem.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : (short)itemInfo.QualityType);
dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
dsItem.PushIntoStack(mallPrice);
dsItem.PushIntoStack(shops.ItemNum);
dsItem.PushIntoStack(shops.BuyNum == 0 ? 1 : 2);
PushIntoStack(dsItem);
}
}
示例10: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(TaskHelper.DailyEveryMaxNum);
this.PushIntoStack(currNum);
this.PushIntoStack(userTaskList.Count);
foreach (UserTask userTask in userTaskList)
{
DailyTaskInfo dtaskInfo = new ConfigCacheSet<DailyTaskInfo>().FindKey(userTask.TaskID);
var userItem = userTask.GetDailyItem(userLv);
ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(userItem != null ? userItem.ItemID : 0);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(userTask.TaskID);
dsItem.PushIntoStack(dtaskInfo.TaskName.ToNotNullString());
dsItem.PushIntoStack((short)userTask.TaskState);
dsItem.PushIntoStack((short)userTask.TaskType);
dsItem.PushIntoStack((short)userTask.TaskStar);
dsItem.PushIntoStack(dtaskInfo.TaskDescp.ToNotNullString());
dsItem.PushIntoStack(dtaskInfo.TaskTarget);
dsItem.PushIntoStack((int)userTask.TaskStar);
dsItem.PushIntoStack(userTask.TaskTargetNum.ToInt());
dsItem.PushIntoStack(userTask.GetDailyExpNum(userLv));
dsItem.PushIntoStack(itemInfo != null ? itemInfo.ItemName.ToNotNullString() : string.Empty);
dsItem.PushIntoStack(userItem != null ? userItem.Num : 0);
this.PushIntoStack(dsItem);
}
}
示例11: BuildPacket
public override void BuildPacket()
{
PushIntoStack(firstName.ToNotNullString());
this.PushIntoStack((short)postType);
this.PushIntoStack((short)isApply);
this.PushIntoStack(fightList.Count);
foreach (var fight in fightList)
{
CityInfo cityInfo = new ConfigCacheSet<CityInfo>().FindKey(fight.CityID);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(fight.CityID);
dsItem.PushIntoStack(cityInfo == null ? string.Empty : cityInfo.CityName.ToNotNullString());
dsItem.PushIntoStack(fight.CityHead.ToNotNullString());
dsItem.PushIntoStack((short)fight.GuildLv);
dsItem.PushIntoStack(fight.SkillNum);
this.PushIntoStack(dsItem);
}
this.PushIntoStack(currCityName.ToNotNullString());
this.PushIntoStack(rewardDesc.ToNotNullString());
this.PushIntoStack(guildName.ToNotNullString());
this.PushIntoStack(endData);
this.PushIntoStack((short)isChampion);
}
示例12: BuildPacket
public override void BuildPacket()
{
PushIntoStack(ContextUser.GoldNum);
PushIntoStack(ContextUser.GameCoin);
PushIntoStack(freeNum);
PushIntoStack(isSale);
PushIntoStack(issTelegrams);
PushIntoStack(grayCrystalArray.Count);
foreach (GrayCrystal crystal in grayCrystalArray)
{
CrystalInfo crystalInfo = new ConfigCacheSet<CrystalInfo>().FindKey(crystal.CrystalID) ?? new CrystalInfo();
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(crystal.UserCrystalID);
dsItem.PushIntoStack(crystalInfo.CrystalID);
dsItem.PushIntoStack(crystalInfo.CrystalName.ToNotNullString());
dsItem.PushIntoStack(crystalInfo.HeadID.ToNotNullString());
dsItem.PushIntoStack((short)crystalInfo.CrystalQuality);
PushIntoStack(dsItem);
}
PushIntoStack(userLightArray.Count);
foreach (UserLight light in userLightArray)
{
ProbabilityInfo probabilityInfo = new ConfigCacheSet<ProbabilityInfo>().FindKey(light.HuntingID);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(light.HuntingID);
dsItem.PushIntoStack(probabilityInfo == null ? 0 : probabilityInfo.Price);
dsItem.PushIntoStack(light.IsLight);
PushIntoStack(dsItem);
}
this.PushIntoStack(prompt.ToNotNullString());
}
示例13: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(abilityInfoArray.Count);
foreach (GuildAbilityInfo abilityInfo in abilityInfoArray)
{
var guildAbilityLvInfos = new ConfigCacheSet<GuildAbilityLvInfo>().FindAll(m => m.ID == abilityInfo.ID);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(abilityInfo.ID);
dsItem.PushIntoStack(abilityInfo.IsCityCombat ? (short)1 : (short)0);
dsItem.PushIntoStack(abilityInfo.AbilityName.ToNotNullString());
dsItem.PushIntoStack((short)abilityInfo.GuildAbilityType);
dsItem.PushIntoStack(abilityInfo.AbilityHead.ToNotNullString());
dsItem.PushIntoStack(abilityInfo.AbilityDesc.ToNotNullString());
dsItem.PushIntoStack(guildAbilityLvInfos.Count);
foreach (GuildAbilityLvInfo lvInfo in guildAbilityLvInfos)
{
DataStruct dsItem1 = new DataStruct();
dsItem1.PushIntoStack(lvInfo.AbilityLv);
dsItem1.PushIntoStack(lvInfo.UpDonateNum);
dsItem1.PushIntoStack(lvInfo.EffectNum.ToString().ToNotNullString());
dsItem.PushIntoStack(dsItem1);
}
this.PushIntoStack(dsItem);
}
}
示例14: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(heritageList.Count);
foreach (var item in heritageList)
{
UserGeneral userGeneral = new GameDataCacheSet<UserGeneral>().FindKey(ContextUser.UserID, item.GeneralID);
GeneralInfo general = new ConfigCacheSet<GeneralInfo>().FindKey(item.GeneralID);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack((short)item.Type);
dsItem.PushIntoStack(userGeneral == null ? 0 : userGeneral.GeneralID);
dsItem.PushIntoStack(userGeneral == null ? string.Empty : ObjectExtend.ToNotNullString(userGeneral.GeneralName));
dsItem.PushIntoStack(general == null ? string.Empty : ObjectExtend.ToNotNullString(general.BattleHeadID));
dsItem.PushIntoStack(item.GeneralLv);
dsItem.PushIntoStack(item.PowerNum);
dsItem.PushIntoStack(item.SoulNum);
dsItem.PushIntoStack(item.IntellectNum);
dsItem.PushIntoStack(userGeneral == null ? (short)0 : (short)userGeneral.GeneralQuality);
this.PushIntoStack(dsItem);
}
this.PushIntoStack(opsInfoList.Count);
foreach (var item in opsInfoList)
{
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(item.Type);
dsItem.PushIntoStack(item.VipLv);
dsItem.PushIntoStack(item.UseGold);
dsItem.PushIntoStack(item.ItemID);
dsItem.PushIntoStack(item.ItemNum);
this.PushIntoStack(dsItem);
}
this.PushIntoStack(heritageName.ToNotNullString());
this.PushIntoStack(heritageLv);
this.PushIntoStack(disGeneralName.ToNotNullString());
}
示例15: BuildPacket
public override void BuildPacket()
{
PushIntoStack(_currVersion);
PushIntoStack(_chatArray.Count);
foreach (var chatMessage in _chatArray)
{
var chat = chatMessage as ChatData ?? new ChatData();
UserFriends friends = new ShareCacheStruct<UserFriends>().FindKey(ContextUser.UserID, chat.FromUserID);
int isFriend = friends != null && friends.FriendType == FriendType.Friend ? 1 : 2;
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(chat.FromUserID.ToNotNullString());
dsItem.PushIntoStack(chat.FromUserName.ToNotNullString());
dsItem.PushIntoStack(chat.Content.ToNotNullString());
dsItem.PushIntoStack(FormatDate(chat.SendDate));
dsItem.PushIntoStack((short)chat.ChatType);
dsItem.PushIntoStack(chat.ToUserID.ToNotNullString());
dsItem.PushIntoStack(chat.ToUserName.ToNotNullString());
dsItem.PushIntoStack(isFriend);
dsItem.PushIntoStack(chat.FromUserVip);
dsItem.PushIntoStack(chat.ToUserVip);
PushIntoStack(dsItem);
}
PushIntoStack(_charItemNum);
}