本文整理汇总了C#中World.Send方法的典型用法代码示例。如果您正苦于以下问题:C# World.Send方法的具体用法?C# World.Send怎么用?C# World.Send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类World
的用法示例。
在下文中一共展示了World.Send方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateGuildRequest
public static void CreateGuildRequest(World.Network.WorldClient client, string packet)
{
string[] data = packet.Substring(2).Split('|');
//Guild creator request pattern : gC8|16777215|8|8796216|Nightteam
int backArtID = int.Parse(data[0]);
int backColor = int.Parse(data[1]);
int frontArtID = int.Parse(data[2]);
int frontColor = int.Parse(data[3]);
Game.Guilds.GuildEmblem emblem = new Game.Guilds.GuildEmblem(backArtID, backColor, frontArtID, frontColor);
string guildName = data[4];
if (!Helper.GuildHelper.ExistGuild(guildName.ToLower()))
{
Game.Guilds.Guild guild = new Game.Guilds.Guild(1, guildName, emblem);
guild.AddMember(client);
client.Action.GuildMember.Rank = Game.Guilds.GuildRank.Leader;
client.Action.GuildMember.AllowFullRight();
}
else // Guild already exist
{
client.Action.SystemMessage("Ce nom de guilde existe deja !");
client.Send("gV");
}
client.Send("gV");
}
示例2: InitDialog
public static void InitDialog(World.Network.WorldClient client, string packet)
{
if (!client.Action.IsOccuped)
{
Database.Records.NpcPositionRecord Npc = client.Character.Map.Engine.GetNpc(int.Parse(packet.Substring(2)));
if (Npc != null)
{
Database.Records.NpcDialogRecord Dialog = Helper.NpcHelper.GetDialog(Npc.Template.InitQuestion);
if (Dialog != null)
{
client.State = Network.WorldClientState.OnDialog;
client.Send("DCK" + int.Parse(packet.Substring(2)));
client.Send("DQ" + Dialog.ID + "|" + Dialog.Responses.Replace(",", ";"));
}
else
{
client.Send("BN");
}
}
else
{
client.Send("BN");
}
}
else
{
client.Send("BN");
}
}
示例3: AddEnemies
public static void AddEnemies(World.Network.WorldClient client, string packet)
{
string addType = packet[2].ToString();
string nickname;
Network.WorldClient player;
switch (addType)
{
case "%"://Character name
nickname = packet.Substring(3);
player = Helper.WorldHelper.GetClientByCharacter(nickname);
if (player != null)
{
client.AccountData.EnemiesIDs.Add(player.AccountData.AccountID);
}
else
{
client.Send("cMEf" + nickname);
}
break;
case "*":
nickname = packet.Substring(3);
player = Helper.WorldHelper.GetClientByCharacter(nickname);
if (player != null)
{
client.AccountData.EnemiesIDs.Add(player.AccountData.AccountID);
}
else
{
client.Send("cMEf" + nickname);
}
break;
default:
nickname = packet.Substring(2);
player = Helper.WorldHelper.GetClientByCharacter(nickname);
if (player != null)
{
client.AccountData.EnemiesIDs.Add(player.AccountData.AccountID);
client.Send("BN");
}
else
{
client.Send("cMEf" + nickname);
}
break;
}
}
示例4: SendOperatorOnline
public static void SendOperatorOnline(World.Network.WorldClient client)
{
var packet = new StringBuilder("100MJ|");
var names = new List<string>();
World.Helper.WorldHelper.GetClientsArray.ToList().ForEach(x => names.Add(x.Character.Nickname));
packet.Append(string.Join("|", names));
names.Clear();
client.Send(packet.ToString());
}
示例5: HandleEmoteRequest
public static void HandleEmoteRequest(World.Network.WorldClient client, string packet)
{
var emoteID = int.Parse(packet.Substring(2));
switch (emoteID)
{
case 1://Sit
client.Action.StartAutoRegen();
break;
}
client.Send("eUK" + client.Character.ID + "|" + emoteID);
}
示例6: CancelInvitation
public static void CancelInvitation(World.Network.WorldClient client)
{
if (client != null)
{
if (client.Action.InvitedGuildPlayer != -1)
{
var otherPlayer = World.Helper.WorldHelper.GetClientByCharacter(client.Action.InvitedGuildPlayer);
if (otherPlayer != null)
{
otherPlayer.Send("gJEc");
otherPlayer.Action.InvitedGuildPlayer = -1;
}
client.Send("gJEc");
client.Action.InvitedGuildPlayer = -1;
}
}
}
示例7: ShowMap
public void ShowMap(World.Network.WorldClient client)
{
if (Map.DecryptKey != "")
{
client.Send(new StringBuilder("GDM|").Append(Map.ID)
.Append("|").Append(Map.CreateTime).Append("|").Append(Map.DecryptKey).ToString());
}
else
{
client.Send(new StringBuilder("GDM|").Append(Map.ID)
.Append("|").Append(Map.CreateTime).ToString());
}
}
示例8: ShowFightListInfos
public void ShowFightListInfos(World.Network.WorldClient client)
{
string packet = "fL";
foreach (World.Game.Fights.Fight fight in FightsOnMap)
{
if (packet.Length > 2)
{
packet += "|";
}
packet += fight.DisplayFightInformations;
}
client.Send(packet);
}
示例9: ShowIO
public void ShowIO(World.Network.WorldClient client)
{
if (!Program.ARKALIA)
{
var packet = new StringBuilder();
foreach (var io in this.InteractiveObjects)
{
packet.Append(io.Value.GetPattern()).Append("\x00");
}
client.Send(packet.ToString());
}
}
示例10: ShowFight
public void ShowFight(World.Game.Fights.Fight fight, World.Network.WorldClient client)
{
client.Send("Gc+" + fight.DisplayPatternBlades);
client.Send("Gt" + fight.RedTeam.DisplayPatternBladeTeam);
client.Send("Gt" + fight.BlueTeam.DisplayPatternBladeTeam);
}
示例11: ShowFightCountOnMap
public void ShowFightCountOnMap(World.Network.WorldClient client)
{
client.Send("fC" + this.FightsOnMap.Count);
}
示例12: SendJobTool
public void SendJobTool(World.Network.WorldClient client)
{
if (client.Character.Items.GetItemAtPos(1) != null)
{
var item = client.Character.Items.GetItemAtPos(1);
if (this.Tools.Contains(item.Template))
{
var packet = new StringBuilder("OT");
packet.Append(this.JobID);
client.Send(packet.ToString());
}
}
}
示例13: ShowDroppedItem
public void ShowDroppedItem(Database.Records.WorldItemRecord item, int cellid, World.Network.WorldClient client)
{
client.Send("GDO+" + cellid + ";" + item.Template + ";" + 0);
}
示例14: ShowPaddocks
public void ShowPaddocks(World.Network.WorldClient client)
{
foreach (var paddock in this.Paddocks)
{
string packet = "Rp";
if (paddock.IsPublic)
{
packet += "-1;";
packet += "0;";
packet += paddock.Capacity + ";";
packet += "0;";
}
else
{
packet += paddock.Owner + ";";
packet += paddock.Cost + ";";
packet += paddock.Capacity + ";";
packet += "0;";
}
client.Send(packet);
}
}
示例15: ExecuteWithClientArg
//.........这里部分代码省略.........
case "scale":
switch (args.Args[2])
{
case "set":
client.Character.Scal = int.Parse(args.Args[3]);
client.Action.RefreshRoleplayEntity();
break;
case "normal":
client.Character.Scal = 100;
client.Action.RefreshRoleplayEntity();
break;
}
break;
case "elite":
switch (args.Args[2])
{
case "up":
World.Game.Elite.EliteManager.UpElite(client);
break;
}
break;
case "level":
switch (args.Args[2])
{
case "set":
if (client.Character.Fighter == null)
{
Database.Records.ExpFloorRecord floor = World.Helper.ExpFloorHelper.GetCharactersLevelFloor(int.Parse(args.Args[3]));
client.Character.Experience = floor.Character;
client.Action.TryLevelUp();
}
else
{
client.Action.SystemMessage("Impossible en combat !");
}
break;
case "add":
if (client.Character.Fighter == null)
{
int addedLevel = int.Parse(args.Args[3]);
int nextLevel = client.Character.Level + addedLevel;
if (nextLevel > 5000)
{
nextLevel = 5000;
}
Database.Records.ExpFloorRecord floor = World.Helper.ExpFloorHelper.GetCharactersLevelFloor(nextLevel);
client.Character.Experience = floor.Character;
client.Action.TryLevelUp();
}
else
{
client.Action.SystemMessage("Impossible en combat !");
}
break;
}
break;
}
break;
case "ui":
switch (args.Args[1])
{
case "show":
switch (args.Args[2])
{
case "paddock":
client.Character.Map.Engine.ShowPaddocksMounts(client);
break;
case "guild":
client.Send("gn");
break;
}
break;
}
break;
case "this":
switch (args.Args[1])
{
case "item":
switch (args.Args[2])
{
case "remove":
Database.Records.WorldItemRecord toDeleteItem = (Database.Records.WorldItemRecord)parameters[0];
client.Character.Items.RemoveItem(toDeleteItem, 1);
break;
}
break;
}
break;
}
}
catch { }
}