本文整理汇总了C#中WorldServer.Network.WorldClass.Send方法的典型用法代码示例。如果您正苦于以下问题:C# WorldClass.Send方法的具体用法?C# WorldClass.Send怎么用?C# WorldClass.Send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WorldServer.Network.WorldClass
的用法示例。
在下文中一共展示了WorldClass.Send方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleRequestUITime
public static void HandleRequestUITime(ref PacketReader packet, ref WorldClass session)
{
PacketWriter uiTime = new PacketWriter(LegacyMessage.UITime);
uiTime.WriteUnixTime();
session.Send(uiTime);
}
示例2: HandleLogoutComplete
public static void HandleLogoutComplete(ref PacketReader packet, ref WorldClass session)
{
WorldMgr.DeleteSession(session.Character.Guid);
PacketWriter logoutComplete = new PacketWriter(LegacyMessage.LogoutComplete);
session.Send(logoutComplete);
}
示例3: HandleSendKnownSpells
public static void HandleSendKnownSpells(ref WorldClass session)
{
Character pChar = session.Character;
var specializationSpells = SpecializationMgr.GetSpecializationSpells(pChar);
var specializationSpellCount = ((specializationSpells != null) ? specializationSpells.Count : 0);
var talentSpells = SpecializationMgr.GetTalentSpells(pChar, pChar.ActiveSpecGroup);
var talentSpellCount = ((talentSpells != null) ? talentSpells.Count : 0);
int count = pChar.SpellList.Count + specializationSpellCount + talentSpellCount;
PacketWriter writer = new PacketWriter(ServerMessage.SendKnownSpells);
BitPack BitPack = new BitPack(writer);
BitPack.Write(1);
BitPack.Write(count, 22);
BitPack.Flush();
pChar.SpellList.ForEach(spell =>
writer.WriteUInt32(spell.SpellId));
if (specializationSpells != null)
specializationSpells.ForEach(spell => writer.WriteUInt32(spell.Spell));
if (talentSpells != null)
talentSpells.ForEach(spell => writer.WriteUInt32(spell));
session.Send(ref writer);
}
示例4: HandleTutorialFlags
public static void HandleTutorialFlags(ref WorldClass session)
{
PacketWriter tutorialFlags = new PacketWriter(LegacyMessage.TutorialFlags);
for (int i = 0; i < 8; i++)
tutorialFlags.WriteUInt32(0);
session.Send(ref tutorialFlags);
}
示例5: HandleCacheVersion
public static void HandleCacheVersion(ref WorldClass session)
{
PacketWriter cacheVersion = new PacketWriter(ServerMessage.CacheVersion);
cacheVersion.WriteUInt32(0);
session.Send(ref cacheVersion);
}
示例6: HandleUpdateClientCacheVersion
public static void HandleUpdateClientCacheVersion(ref WorldClass session)
{
PacketWriter cacheVersion = new PacketWriter(LegacyMessage.UpdateClientCacheVersion);
cacheVersion.WriteUInt32(0);
session.Send(cacheVersion);
}
示例7: HandleUITimeRequest
public static void HandleUITimeRequest(ref PacketReader packet, WorldClass session)
{
PacketWriter uiTime = new PacketWriter(ServerMessage.UITime);
uiTime.WriteUnixTime();
session.Send(ref uiTime);
}
示例8: HandleObjectDestroy
public static void HandleObjectDestroy(ref WorldClass session)
{
PacketWriter objectDestroy = new PacketWriter(LegacyMessage.ObjectDestroy);
objectDestroy.WriteUInt64(session.Character.Guid);
objectDestroy.WriteUInt8(0);
session.Send(objectDestroy);
}
示例9: HandleMessageOfTheDay
public static void HandleMessageOfTheDay(ref WorldClass session)
{
PacketWriter motd = new PacketWriter(LegacyMessage.MessageOfTheDay);
motd.WriteUInt32(3);
motd.WriteCString("Arctium MoP test");
motd.WriteCString("Welcome to our MoP server test.");
motd.WriteCString("Your development team =)");
session.Send(ref motd);
}
示例10: HandlePong
public static void HandlePong(ref PacketReader packet, ref WorldClass session)
{
uint sequence = packet.ReadUInt32();
uint latency = packet.ReadUInt32();
PacketWriter pong = new PacketWriter(JAMCCMessage.Pong);
pong.WriteUInt32(sequence);
session.Send(pong);
}
示例11: HandleLogoutComplete
public static void HandleLogoutComplete(ref PacketReader packet, ref WorldClass session)
{
var pChar = session.Character;
ObjectMgr.SavePositionToDB(pChar);
WorldMgr.DeleteSession(pChar.Guid);
PacketWriter logoutComplete = new PacketWriter(LegacyMessage.LogoutComplete);
session.Send(logoutComplete);
}
示例12: HandleLogoutCancel
public static void HandleLogoutCancel(ref PacketReader packet, WorldClass session)
{
cts.Cancel();
MoveHandler.HandleMoveUnroot(session);
PacketWriter LogoutCancelAck = new PacketWriter(ServerMessage.LogoutCancelAck);
session.Send(ref LogoutCancelAck);
session.Character.setStandState(0);
}
示例13: HandleSendNewTimeSpeed
public static void HandleSendNewTimeSpeed(ref WorldClass session)
{
PacketWriter newTimeSpeed = new PacketWriter(LegacyMessage.SendNewTimeSpeed);
newTimeSpeed.WritePackedTime();
newTimeSpeed.WritePackedTime();
newTimeSpeed.WriteFloat(0.01666667f);
newTimeSpeed.WriteInt32(0);
newTimeSpeed.WriteInt32(0);
session.Send(ref newTimeSpeed);
}
示例14: HandleAuthChallenge
public static void HandleAuthChallenge(ref PacketReader packet, ref WorldClass session)
{
PacketWriter authChallenge = new PacketWriter(ServerMessage.AuthChallenge, true);
for (int i = 0; i < 8; i++)
authChallenge.WriteUInt32(0);
authChallenge.WriteUInt32((uint)new Random(DateTime.Now.Second).Next(1, 0xFFFFFFF));
authChallenge.WriteUInt8(1);
session.Send(ref authChallenge);
}
示例15: HandleRealmSplitStateResponse
public static void HandleRealmSplitStateResponse(ref PacketReader packet, ref WorldClass session)
{
uint realmSplitState = 0;
PacketWriter realmSplitStateResp = new PacketWriter(LegacyMessage.RealmSplitStateResponse);
realmSplitStateResp.WriteUInt32(packet.ReadUInt32());
realmSplitStateResp.WriteUInt32(realmSplitState);
realmSplitStateResp.WriteCString("01/01/01");
session.Send(ref realmSplitStateResp);
}