本文整理汇总了C#中Mooege.Net.GS.GameClient.FlushOutgoingBuffer方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.FlushOutgoingBuffer方法的具体用法?C# GameClient.FlushOutgoingBuffer怎么用?C# GameClient.FlushOutgoingBuffer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mooege.Net.GS.GameClient
的用法示例。
在下文中一共展示了GameClient.FlushOutgoingBuffer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Consume
public void Consume(GameClient client, GameMessage message)
{
if (message is AssignActiveSkillMessage) OnAssignActiveSkill(client, (AssignActiveSkillMessage)message);
else if (message is AssignPassiveSkillMessage) OnAssignPassiveSkill(client, (AssignPassiveSkillMessage)message);
else if (message is PlayerChangeHotbarButtonMessage) OnPlayerChangeHotbarButtonMessage(client, (PlayerChangeHotbarButtonMessage)message);
else return;
UpdateClient(client);
client.FlushOutgoingBuffer();
}
示例2: ChangeToonWorld
public void ChangeToonWorld(GameClient client, int WorldID, Vector3D Pos)
{
Hero hero = client.Player.Hero;
World newworld = null;
//don't use getworld() here as that'd create a new empty world anyway
foreach (var x in _worlds)
if (x.WorldID == WorldID)
newworld = x;
World currentworld = null;
//don't use getworld() here as that'd create a new empty world anyway
foreach (var x in _worlds)
if (x.WorldID == hero.WorldId)
currentworld = x;
if (newworld == null || currentworld==null) return; //don't go to a world we don't have in the universe
currentworld.DestroyWorld(hero);
hero.WorldId = newworld.WorldID;
hero.CurrentWorldSNO = newworld.WorldSNO;
hero.Position.X = Pos.X;
hero.Position.Y = Pos.Y;
hero.Position.Z = Pos.Z;
newworld.Reveal(hero);
client.SendMessage(new ACDWorldPositionMessage
{
Id = 0x3f,
Field0 = 0x789E00E2,
Field1 = new WorldLocationMessageData
{
Field0 = 1.43f,
Field1 = new PRTransform
{
Field0 = new Quaternion
{
Amount = 0.05940768f,
Axis = new Vector3D
{
X = 0f,
Y = 0f,
Z = 0.9982339f,
}
},
ReferencePoint = hero.Position,
},
Field2 = newworld.WorldID,
}
});
client.FlushOutgoingBuffer();
client.SendMessage(new PlayerWarpedMessage()
{
Id = 0x0B1,
Field0 = 9,
Field1 = 0f,
});
client.PacketId += 40 * 2;
client.SendMessage(new DWordDataMessage()
{
Id = 0x89,
Field0 = client.PacketId,
});
client.FlushOutgoingBuffer();
}
示例3: Consume
public void Consume(GameClient client, GameMessage message)
{
if (message is AssignActiveSkillMessage) OnAssignActiveSkill(client, (AssignActiveSkillMessage)message);
else if (message is AssignPassiveSkillMessage) OnAssignPassiveSkill(client, (AssignPassiveSkillMessage)message);
else if (message is PlayerChangeHotbarButtonMessage) OnPlayerChangeHotbarButtonMessage(client, (PlayerChangeHotbarButtonMessage)message);
else if (message is TargetMessage) OnObjectTargeted(client, message);
else if (message is SecondaryAnimationPowerMessage) OnObjectTargeted(client, message);
else return;
UpdateState();
client.FlushOutgoingBuffer();
}