本文整理汇总了C#中Game.Base.Packets.GSPacketIn.ReadDateTime方法的典型用法代码示例。如果您正苦于以下问题:C# GSPacketIn.ReadDateTime方法的具体用法?C# GSPacketIn.ReadDateTime怎么用?C# GSPacketIn.ReadDateTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Game.Base.Packets.GSPacketIn
的用法示例。
在下文中一共展示了GSPacketIn.ReadDateTime方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleGameRoomCreate
public void HandleGameRoomCreate(GSPacketIn pkg)
{
int roomId = pkg.ReadInt();
int gameType = pkg.ReadInt();
int guildId = pkg.ReadInt();
int count = pkg.ReadInt();
int totalLevel = 0;
IGamePlayer[] players = new IGamePlayer[count];
for (int i = 0; i < count; i++)
{
PlayerInfo info = new PlayerInfo();
info.ID = pkg.ReadInt();
info.NickName = pkg.ReadString();
info.Sex = pkg.ReadBoolean();
info.Hide = pkg.ReadInt();
info.Style = pkg.ReadString();
info.Colors = pkg.ReadString();
info.Skin = pkg.ReadString();
info.Offer = pkg.ReadInt();
info.GP = pkg.ReadInt();
info.Grade = pkg.ReadInt();
info.Repute = pkg.ReadInt();
info.ConsortiaID = pkg.ReadInt();
info.ConsortiaName = pkg.ReadString();
info.ConsortiaLevel = pkg.ReadInt();
info.ConsortiaRepute = pkg.ReadInt();
info.Attack = pkg.ReadInt();
info.Defence = pkg.ReadInt();
info.Agility = pkg.ReadInt();
info.Luck = pkg.ReadInt();
double baseAttack = pkg.ReadDouble();
double baseDefence = pkg.ReadDouble();
double baseAgility = pkg.ReadDouble();
double baseBlood = pkg.ReadDouble();
int templateId = pkg.ReadInt();
bool canUserProp = pkg.ReadBoolean();
int secondWeapon = pkg.ReadInt();
int strengthLevel = pkg.ReadInt();
double gprate = pkg.ReadDouble();
double offerrate = pkg.ReadDouble();
double rate = pkg.ReadDouble();
int serverid = pkg.ReadInt();
ItemTemplateInfo itemTemplate = ItemMgr.FindItemTemplate(templateId);
ItemInfo item = null;
if (secondWeapon != 0)
{
ItemTemplateInfo secondWeaponTemp = ItemMgr.FindItemTemplate(secondWeapon);
item = ItemInfo.CreateFromTemplate(secondWeaponTemp, 1, 1);
item.StrengthenLevel = strengthLevel;
}
List<BufferInfo> infos = new List<BufferInfo>();
int buffercout = pkg.ReadInt();
for (int j = 0; j < buffercout; j++)
{
BufferInfo buffinfo = new BufferInfo();
buffinfo.Type = pkg.ReadInt();
buffinfo.IsExist = pkg.ReadBoolean();
buffinfo.BeginDate = pkg.ReadDateTime();
buffinfo.ValidDate = pkg.ReadInt();
buffinfo.Value = pkg.ReadInt();
if (info != null)
infos.Add(buffinfo);
}
players[i] = new ProxyPlayer(this, info, itemTemplate, item, baseAttack, baseDefence, baseAgility, baseBlood, gprate, offerrate, rate, infos, serverid);
players[i].CanUseProp = canUserProp;
int ec = pkg.ReadInt();
for (int j = 0; j < ec; j++)
{
players[i].EquipEffect.Add(pkg.ReadInt());
}
totalLevel += info.Grade;
}
ProxyRoom room = new ProxyRoom(ProxyRoomMgr.NextRoomId(), roomId, players, this);
room.GuildId = guildId;
room.GameType = (eGameType)gameType;
lock (m_rooms)
{
if (!m_rooms.ContainsKey(roomId))
{
m_rooms.Add(roomId, room);
}
else
{
room = null;
}
}
if (room != null)
//.........这里部分代码省略.........
示例2: HandleConsortiaUserPass
public void HandleConsortiaUserPass(GSPacketIn packet)
{
int cid = packet.ReadInt();
bool isInvite = packet.ReadBoolean();
int consortiaID = packet.ReadInt();
string consortiaName = packet.ReadString();
int id = packet.ReadInt();
string userName = packet.ReadString();
int inviteUserID = packet.ReadInt();
string inviteUserName = packet.ReadString();
int dutyID = packet.ReadInt();
string dutyName = packet.ReadString();
int offer = packet.ReadInt();
int richesOffer = packet.ReadInt();
int richesRob = packet.ReadInt();
DateTime lastDate = packet.ReadDateTime();
int grade = packet.ReadInt();
int level = packet.ReadInt();
int state = packet.ReadInt();
bool sex = packet.ReadBoolean();
int right = packet.ReadInt();
int win = packet.ReadInt();
int total = packet.ReadInt();
int escape = packet.ReadInt();
int consortiaRepute = packet.ReadInt();
GamePlayer[] players = WorldMgr.GetAllPlayers();
foreach (GamePlayer p in players)
{
if (p.PlayerCharacter.ID == id)
{
p.BeginChanges();
p.PlayerCharacter.ConsortiaID = consortiaID;
p.PlayerCharacter.ConsortiaName = consortiaName;
p.PlayerCharacter.DutyName = dutyName;
p.PlayerCharacter.DutyLevel = level;
p.PlayerCharacter.Right = right;
p.PlayerCharacter.ConsortiaRepute = consortiaRepute;
ConsortiaInfo consotia = ConsortiaMgr.FindConsortiaInfo(consortiaID);
if (consotia != null)
p.PlayerCharacter.ConsortiaLevel = consotia.Level;
p.CommitChanges();
}
if (p.PlayerCharacter.ConsortiaID == consortiaID)
{
p.Out.SendTCP(packet);
}
}
}