本文整理汇总了C#中ZyGames.Framework.Game.Service.DataStruct类的典型用法代码示例。如果您正苦于以下问题:C# DataStruct类的具体用法?C# DataStruct怎么用?C# DataStruct使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataStruct类属于ZyGames.Framework.Game.Service命名空间,在下文中一共展示了DataStruct类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(medicineArray.Length);
foreach (string item in medicineArray)
{
short mType = (short)medicineType;
string[] mArray = item.Replace("{", "").Replace("}", "").Split('=');
short medicineLv = 0;
int useGold = 0;
List<ItemBaseInfo> itemInfoArray = new List<ItemBaseInfo>();
if (mArray.Length > 0)
{
string q = mArray[0];
string b = mArray[1];
medicineLv = q.ToShort();
useGold = b.ToShort();
itemInfoArray = new ConfigCacheSet<ItemBaseInfo>().FindAll(u => u.MedicineLv.Equals(medicineLv) && u.MedicineType.Equals(mType) && u.ItemType == ItemType.YaoJi);
}
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(itemInfoArray.Count == 0 ? 0 : itemInfoArray[0].ItemID);
dsItem.PushIntoStack(itemInfoArray.Count == 0 ? string.Empty : itemInfoArray[0].ItemName.ToNotNullString());
dsItem.PushIntoStack(medicineLv);
dsItem.PushIntoStack(itemInfoArray.Count == 0 ? string.Empty : itemInfoArray[0].HeadID.ToNotNullString());
dsItem.PushIntoStack(useGold);
this.PushIntoStack(dsItem);
}
}
开发者ID:0jpq0,项目名称:Scut,代码行数:28,代码来源:Action1414.cs
示例2: BuildPacket
public override void BuildPacket()
{
PushIntoStack(pageCount);
PushIntoStack(userRankArray.Count);
foreach (UserRank userInfo in userRankArray)
{
if (rankType == RankType.UserLv)
{
baseNum = userInfo.UserLv;
}
else if (rankType == RankType.Obtion)
{
baseNum = userInfo.ObtainNum;
}
else if (rankType == RankType.GameCoin)
{
baseNum = userInfo.GameCoin;
}
else if (rankType == RankType.ZhanLi)
{
baseNum = userInfo.TotalCombatNum;
}
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(userInfo.RankId);
dsItem.PushIntoStack(userInfo.UserID.ToNotNullString());
dsItem.PushIntoStack(userInfo.NickName.ToNotNullString());
dsItem.PushIntoStack(baseNum);
dsItem.PushIntoStack((short)userInfo.CountryID);
dsItem.PushIntoStack((short)userInfo.VipLv);
PushIntoStack(dsItem);
}
PushIntoStack(currRankID);
}
开发者ID:daneric,项目名称:Scut-samples,代码行数:33,代码来源:Action1019.cs
示例3: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(currNum);
this.PushIntoStack(unopened);
this.PushIntoStack(userGeneralArray.Count);
foreach (var general in userGeneralArray)
{
int worseNum = 0;
int demandNum = 0;
short isRecruit = GeneralHelper.IsGeneralRecruit(general.UserID, general.GeneralID, out worseNum, out demandNum);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(general.GeneralID);
dsItem.PushIntoStack(general.GeneralName.ToNotNullString());
dsItem.PushIntoStack(general.HeadID.ToNotNullString());
dsItem.PushIntoStack(general.GeneralLv);
dsItem.PushIntoStack((short)general.GeneralQuality);
dsItem.PushIntoStack(general.AtmanNum);
dsItem.PushIntoStack(worseNum);
dsItem.PushIntoStack((short)isRecruit);
dsItem.PushIntoStack(general.IsBattle ? 1 : 0);
dsItem.PushIntoStack(demandNum);
this.PushIntoStack(dsItem);
}
PushIntoStack(_isEnabled);
}
开发者ID:jinfei426,项目名称:Scut,代码行数:25,代码来源:Action1401.cs
示例4: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(magicList.Count);
foreach (MagicInfo magicInfo in magicList)
{
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(magicInfo.MagicID);
dsItem.PushIntoStack(magicInfo.MagicType.ToInt());
dsItem.PushIntoStack(magicInfo.MagicName.ToNotNullString());
dsItem.PushIntoStack(magicInfo.HeadID.ToNotNullString());
dsItem.PushIntoStack(magicInfo.MagicDesc.ToNotNullString());
var magicLvList = new ConfigCacheSet<MagicLvInfo>().FindAll(m => m.MagicID == magicInfo.MagicID);
dsItem.PushIntoStack(magicLvList.Count);
foreach (MagicLvInfo magicLv in magicLvList)
{
DataStruct dsItem1 = new DataStruct();
dsItem1.PushIntoStack(magicLv.MagicLv.ToShort());
dsItem1.PushIntoStack(magicLv.ExpNum);
dsItem1.PushIntoStack(magicLv.ColdTime);
dsItem1.PushIntoStack(magicLv.EscalateMinLv.ToShort());
dsItem1.PushIntoStack(magicLv.AbilityType.ToShort());
dsItem1.PushIntoStack(magicLv.EffectNum.ToNotNullString());
dsItem1.PushIntoStack(magicLv.GridMaxNum);
dsItem.PushIntoStack(dsItem1);
}
this.PushIntoStack(dsItem);
}
}
开发者ID:0jpq0,项目名称:Scut,代码行数:31,代码来源:Action1504.cs
示例5: BuildPacket
public override void BuildPacket()
{
PushIntoStack(_pageCount);
PushIntoStack(_petRunPools.Count);
foreach (var item in _petRunPools)
{
var user = UserCacheGlobal.LoadOffline(item.UserID) ?? new GameUser();
string guidName = string.Empty;
if (!string.IsNullOrEmpty(user.MercenariesID))
{
guidName = (new ShareCacheStruct<UserGuild>().FindKey(user.MercenariesID) ?? new UserGuild()).GuildName;
}
string friendName = string.Empty;
if (!string.IsNullOrEmpty(item.FriendID))
{
friendName = (UserCacheGlobal.LoadOffline(item.FriendID) ?? new GameUser()).NickName;
}
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(item.UserID.ToNotNullString());
dsItem.PushIntoStack(user.NickName.ToNotNullString());
dsItem.PushIntoStack(user.UserLv);
dsItem.PushIntoStack(guidName.ToNotNullString());
dsItem.PushIntoStack(item.ColdTime);
dsItem.PushIntoStack(item.PetID);
dsItem.PushIntoStack(friendName.ToNotNullString());
dsItem.PushIntoStack(item.InterceptGameCoin);
dsItem.PushIntoStack(item.InterceptObtainNum);
this.PushIntoStack(dsItem);
}
}
开发者ID:jinfei426,项目名称:Scut,代码行数:32,代码来源:Action3205.cs
示例6: BuildPacket
public override void BuildPacket()
{
PushIntoStack(pageCount);
PushIntoStack(ContextUser.ExpNum);
PushIntoStack(queueID);
PushIntoStack(coldTime);
PushIntoStack(userMagicArray.Count);
foreach (UserMagic magic in userMagicArray)
{
magicInfo = new ConfigCacheSet<MagicInfo>().FindKey(magic.MagicID);
if (IsUp(magic.MagicID, magic.MagicLv, ContextUser))
{
isUp = 1;
}
else
{
isUp = 0;
}
DataStruct ds = new DataStruct();
ds.PushIntoStack(magic.MagicID);
ds.PushIntoStack((int)magic.MagicType);
ds.PushIntoStack(magicInfo == null ? string.Empty : magicInfo.MagicName.ToNotNullString());
ds.PushIntoStack(magicInfo == null ? string.Empty : magicInfo.HeadID.ToNotNullString());
ds.PushIntoStack((short)magic.MagicLv);
ds.PushIntoStack(isUp);
ds.PushIntoStack(magic.IsOpen ? 1 : 0);
ds.PushIntoStack(magic.IsLv);
PushIntoStack(ds);
}
}
开发者ID:jinfei426,项目名称:Scut,代码行数:31,代码来源:Action1501.cs
示例7: BuildPacket
public override void BuildPacket()
{
PushIntoStack(_chargePacksArray.Count);
foreach (RechargePacks packs in _chargePacksArray)
{
short _isRevice = 0;
short _isShow = 0;
List<PackageReceive> receivesArray = new GameDataCacheSet<PackageReceive>().FindAll(ContextUser.UserID, u => u.IsReceive == false && u.PacksID == packs.PacksID);
if (receivesArray.Count == 0)
{
_isRevice = 2;
}
else
{
_isRevice = 1;
}
SaveLog(receivesArray.Count + ContextUser.UserID + packs.PacksID);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(packs.PacksID);
dsItem.PushIntoStack(packs.PacksName);
dsItem.PushIntoStack(_isRevice);
dsItem.PushIntoStack(_isShow);
dsItem.PushIntoStack(receivesArray.Count);
PushIntoStack(dsItem);
}
}
开发者ID:jinfei426,项目名称:Scut,代码行数:27,代码来源:Action9003.cs
示例8: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(itemBaseList.Count);
foreach (ItemBaseInfo itemInfo in itemBaseList)
{
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(itemInfo.ItemID);
dsItem.PushIntoStack(itemInfo.ItemName.ToNotNullString());
dsItem.PushIntoStack(itemInfo.HeadID.ToNotNullString());
dsItem.PushIntoStack(itemInfo.ItemDesc.ToNotNullString());
dsItem.PushIntoStack(itemInfo.ItemType.ToShort());
dsItem.PushIntoStack(itemInfo.EquParts.ToShort());
dsItem.PushIntoStack(itemInfo.QualityType.ToShort());
dsItem.PushIntoStack(itemInfo.DemandLv.ToShort());
string[] careerList = itemInfo.CareerRange.Split(new char[] { ',' });
dsItem.PushIntoStack(careerList.Length);
foreach (string CareerID in careerList)
{
CareerInfo careerInfo = new ConfigCacheSet<CareerInfo>().FindKey(CareerID.ToInt());
DataStruct dsItem1 = new DataStruct();
dsItem1.PushIntoStack(careerInfo != null ? careerInfo.CareerID.ToInt() : (int)0);
dsItem1.PushIntoStack(careerInfo != null ? careerInfo.CareerName.ToNotNullString() : string.Empty);
dsItem.PushIntoStack(dsItem1);
}
var equList = new ConfigCacheSet<ItemEquAttrInfo>().FindAll(m => m.ItemID == itemInfo.ItemID);
dsItem.PushIntoStack(equList.Count);
foreach (ItemEquAttrInfo equ in equList)
{
DataStruct dsItem1 = new DataStruct();
dsItem1.PushIntoStack(equ.AttributeID.ToInt());
dsItem1.PushIntoStack(equ.BaseNum);
dsItem1.PushIntoStack(equ.IncreaseNum);
dsItem.PushIntoStack(dsItem1);
}
dsItem.PushIntoStack(itemInfo.MedicineType);
dsItem.PushIntoStack(itemInfo.MedicineLv);
dsItem.PushIntoStack(itemInfo.MedicineNum);
dsItem.PushIntoStack(itemInfo.PropType);
dsItem.PushIntoStack(itemInfo.EffectNum.ToNotNullString());
var itemSynthesisList = new ConfigCacheSet<ItemSynthesisInfo>().FindAll(m => m.ItemID == itemInfo.ItemID);
dsItem.PushIntoStack(itemSynthesisList.Count);
foreach (ItemSynthesisInfo synthesisInfo in itemSynthesisList)
{
DataStruct dsItem1 = new DataStruct();
dsItem1.PushIntoStack(synthesisInfo.SynthesisID);
dsItem1.PushIntoStack(synthesisInfo.DemandNum);
dsItem1.PushIntoStack(synthesisInfo.SynthesisNum);
dsItem.PushIntoStack(dsItem1);
}
this.PushIntoStack(dsItem);
}
}
开发者ID:rongxiong,项目名称:Scut,代码行数:60,代码来源:Action7010.cs
示例9: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(userGeneral == null ? string.Empty : userGeneral.GeneralName.ToNotNullString());
this.PushIntoStack(userGeneral == null ? string.Empty : userGeneral.HeadID.ToNotNullString());
this.PushIntoStack(userGeneral == null ? (short)0 : userGeneral.FeelLv);
this.PushIntoStack(userGeneral == null ? 0 : userGeneral.FeelExperience);
this.PushIntoStack(upExperience);
this.PushIntoStack(giftName.ToNotNullString());
this.PushIntoStack(userGeneral == null ? (short)0 : userGeneral.SaturationNum);
this.PushIntoStack(goldNum);
this.PushIntoStack(skillName.ToNotNullString());
this.PushIntoStack(demandLv);
this.PushIntoStack(isLearn);
this.PushIntoStack(skillDesc.ToNotNullString());
this.PushIntoStack(isSaturation);
this.PushIntoStack(propertyList.Count);
foreach (var item in propertyList)
{
int upNum = GiftHelper.FeelUpPropertyNum(ContextUser.UserID, generalID, item.AbilityType);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack((int)item.AbilityType);
dsItem.PushIntoStack((int)item.AbilityValue);
dsItem.PushIntoStack(upNum);
this.PushIntoStack(dsItem);
}
}
开发者ID:jinfei426,项目名称:Scut,代码行数:26,代码来源:Action1420.cs
示例10: 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);
}
开发者ID:jinfei426,项目名称:Scut,代码行数:25,代码来源:Action6401.cs
示例11: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(pageCount);
this.PushIntoStack(abilityArray.Count);
foreach (GuildAbility ability in abilityArray)
{
GuildAbilityInfo abilityInfo = new ConfigCacheSet<GuildAbilityInfo>().FindKey(ability.ID);
if (abilityInfo != null)
{
isCityCombat = abilityInfo.IsCityCombat ? (short)1 : (short)0;
}
GuildAbilityLvInfo abilityLvInfo = new ConfigCacheSet<GuildAbilityLvInfo>().FindKey(ability.ID, ability.Lv);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(ability.ID);
dsItem.PushIntoStack(abilityInfo == null ? string.Empty : abilityInfo.AbilityName.ToNotNullString());
dsItem.PushIntoStack(abilityInfo == null ? string.Empty : abilityInfo.AbilityHead.ToNotNullString());
dsItem.PushIntoStack(ability.Lv);
dsItem.PushIntoStack(abilityLvInfo == null ? string.Empty : abilityLvInfo.EffectNum.ToString().ToNotNullString());
dsItem.PushIntoStack(abilityLvInfo == null ? 0 : abilityLvInfo.UpDonateNum);
dsItem.PushIntoStack(isCityCombat);
dsItem.PushIntoStack(abilityInfo == null ? (short)0 : (short)abilityInfo.GuildAbilityType);
this.PushIntoStack(dsItem);
}
this.PushIntoStack(gAbilityInfo == null ? string.Empty : gAbilityInfo.AbilityName.ToNotNullString());
this.PushIntoStack(currExperience);
this.PushIntoStack(donateCoin);
this.PushIntoStack(donateGold);
}
开发者ID:jinfei426,项目名称:Scut,代码行数:28,代码来源:Action6201.cs
示例12: BuildPacket
public override void BuildPacket()
{
this.PushIntoStack(lifeNum);
this.PushIntoStack((short)powerNum);
this.PushIntoStack((short)soulNum);
this.PushIntoStack((short)intelligenceNum);
this.PushIntoStack((short)isPractice);
this.PushIntoStack(storyTaskArray.Length);
foreach (var task in storyTaskArray)
{
int collectNum = TrumpHelper.GetUserItemNum(ContextUser.UserID, task.TargetItemID);
iscomplete = IsComplete(ContextUser, task);
PlotInfo plotInfo = new ConfigCacheSet<PlotInfo>().FindKey(task.PlotID);
ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(task.TargetItemID);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(task.TaskID);
dsItem.PushIntoStack(task.TaskName.ToNotNullString());
dsItem.PushIntoStack(task.TaskDescp.ToNotNullString());
dsItem.PushIntoStack(plotInfo == null ? 0 : plotInfo.CityID);
dsItem.PushIntoStack(task.PlotID);
dsItem.PushIntoStack(task.TargetItemID);
dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
dsItem.PushIntoStack(collectNum);
dsItem.PushIntoStack(task.TargetItemNum);
dsItem.PushIntoStack((short)iscomplete);
this.PushIntoStack(dsItem);
}
}
开发者ID:jinfei426,项目名称:Scut,代码行数:31,代码来源:Action1451.cs
示例13: 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);
}
}
开发者ID:0jpq0,项目名称:Scut,代码行数:33,代码来源:Action4204.cs
示例14: BuildPacket
public override void BuildPacket()
{
PushIntoStack(plotInfo.PlotName.ToNotNullString());
PushIntoStack(plotInfo.BgScene.ToNotNullString());
PushIntoStack(plotInfo.FgScene.ToNotNullString());
PushIntoStack(npcList.Count);
foreach (PlotNPCInfo item in npcList)
{
DataStruct ds = new DataStruct();
ds.PushIntoStack(item.PlotNpcID);
ds.PushIntoStack(item.NpcSeqNo);
ds.PushIntoStack(item.NpcName.ToNotNullString());
ds.PushIntoStack(item.HeadID.ToNotNullString());
ds.PushIntoStack(item.NpcTip.ToNotNullString());
ds.PushIntoStack(item.PointX);
ds.PushIntoStack(item.PointY);
bool isPlayStory = false;
var userPlot = UserPlotHelper.GetUserPlotInfo(ContextUser.UserID, plotID);
if (userPlot == null || userPlot.PlotStatus != PlotStatus.Completed)
{
isPlayStory = true;
}
ds.PushIntoStack(isPlayStory ? item.PreStoryCode.ToNotNullString() : string.Empty);
ds.PushIntoStack(isPlayStory ? item.AftStoryCode.ToNotNullString() : string.Empty);
PushIntoStack(ds);
}
PushIntoStack(_isOverCombat ? (short)1 : (short)0);
PushIntoStack(_plotNum);
}
开发者ID:0jpq0,项目名称:Scut,代码行数:29,代码来源:Action4002.cs
示例15: BuildPacket
public override void BuildPacket()
{
PushIntoStack(_gameActiveList.Length);
foreach (GameActive gameActive in _gameActiveList)
{
DateTime enableTime = DateTime.MinValue;
DateTime endTime = DateTime.MinValue;
short isEnable = 0;
RefEnableTime(gameActive, ref enableTime, ref endTime, ref isEnable);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(gameActive.ActiveId);
dsItem.PushIntoStack(gameActive.ActiveName.ToNotNullString());
dsItem.PushIntoStack(gameActive.ActiveType.ToShort());
dsItem.PushIntoStack(enableTime.ToString("HH:mm").ToNotNullString());
dsItem.PushIntoStack(endTime.ToString("HH:mm").ToNotNullString());
dsItem.PushIntoStack(isEnable);
dsItem.PushIntoStack(gameActive.BossLv);
dsItem.PushIntoStack(gameActive.HeadID.ToNotNullString());
dsItem.PushIntoStack(gameActive.Descption.ToNotNullString());
dsItem.PushIntoStack(gameActive.ActiveStyle);
dsItem.PushIntoStack(!string.IsNullOrEmpty(ContextUser.MercenariesID)
? ContextUser.MercenariesID
: string.Empty);
PushIntoStack(dsItem);
}
}
开发者ID:jinfei426,项目名称:Scut,代码行数:28,代码来源:Action3009.cs
示例16: 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);
}
开发者ID:rongxiong,项目名称:Scut,代码行数:25,代码来源:Action9204.cs
示例17: 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);
}
}
开发者ID:rongxiong,项目名称:Scut,代码行数:28,代码来源:Action1101.cs
示例18: 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());
}
开发者ID:daneric,项目名称:Scut-samples,代码行数:26,代码来源:Action6101.cs
示例19: BuildPacket
public override void BuildPacket()
{
PushIntoStack(generalInfo == null ? string.Empty : generalInfo.GeneralName.ToNotNullString());
PushIntoStack(generalMedicineArray.Count);
foreach (GeneralMedicine item in generalMedicineArray)
{
ItemBaseInfo itemInfo = new ShareCacheStruct<ItemBaseInfo>().FindKey(item.MedicineID);
int itemcount = TrumpHelper.GetUserItemNum(item.UserID, item.MedicineID);
if (itemcount > 0)
{
gridStatus = 1;
}
else
{
gridStatus = 2;
}
DataStruct ds = new DataStruct();
ds.PushIntoStack(item.MedicineID);
ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
ds.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : itemInfo.MedicineLv);
ds.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : itemInfo.MedicineType);
ds.PushIntoStack((short)GetGeneralMedicine(item));
ds.PushIntoStack(gridStatus);
ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
PushIntoStack(ds);
}
this.PushIntoStack(powerNum);
this.PushIntoStack(soulNum);
this.PushIntoStack(intellectNum);
}
开发者ID:daneric,项目名称:Scut-samples,代码行数:33,代码来源:Action1406.cs
示例20: BuildPacket
public override void BuildPacket()
{
PushIntoStack(trumpInfoArray.Length);
foreach (var trumpInfo in trumpInfoArray)
{
isOpen = trumpLv >= trumpInfo.TrumpLv ? 1 : 0;
SkillInfo skillInfo = TrumpHelper.GetSkillInfo(ContextUser.UserID, skillcount);
if (skillInfo != null && skillInfo.AbilityLv >= GameConfigSet.MaxSkillLv)
{
isFull = 1;
}
else
{
isFull = 0;
}
AbilityInfo abilityInfo = TrumpHelper.GetAbilityInfo(ContextUser.UserID, skillcount);
DataStruct dsItem = new DataStruct();
dsItem.PushIntoStack(abilityInfo == null ? (short)0 : (short)abilityInfo.AbilityID);
dsItem.PushIntoStack(abilityInfo == null ? string.Empty : abilityInfo.AbilityName.ToNotNullString());
dsItem.PushIntoStack(abilityInfo == null ? string.Empty : abilityInfo.HeadID.ToNotNullString());
dsItem.PushIntoStack(skillInfo == null ? (short)0 : skillInfo.AbilityLv);
dsItem.PushIntoStack(abilityInfo == null ? string.Empty : abilityInfo.AbilityDesc.ToNotNullString());
dsItem.PushIntoStack((short)isOpen);
dsItem.PushIntoStack(trumpInfo.TrumpLv);
dsItem.PushIntoStack(isFull);
PushIntoStack(dsItem);
skillcount++;
}
}
开发者ID:daneric,项目名称:Scut-samples,代码行数:29,代码来源:Action1459.cs
注:本文中的ZyGames.Framework.Game.Service.DataStruct类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论