本文整理汇总了C#中GameNPC.GetPlayersInRadius方法的典型用法代码示例。如果您正苦于以下问题:C# GameNPC.GetPlayersInRadius方法的具体用法?C# GameNPC.GetPlayersInRadius怎么用?C# GameNPC.GetPlayersInRadius使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameNPC
的用法示例。
在下文中一共展示了GameNPC.GetPlayersInRadius方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateDunwynClone
protected void CreateDunwynClone()
{
if (dunwynClone == null)
{
dunwynClone = new GameNPC();
dunwynClone.Name = dunwyn.Name;
dunwynClone.Model = dunwyn.Model;
dunwynClone.GuildName = dunwyn.GuildName;
dunwynClone.Realm = dunwyn.Realm;
dunwynClone.CurrentRegionID = 1;
dunwynClone.Size = dunwyn.Size;
dunwynClone.Level = 15; // to make the figthing against fairy sorceress a bit more dramatic :)
dunwynClone.X = 567604 + Util.Random(-150, 150);
dunwynClone.Y = 509619 + Util.Random(-150, 150);
dunwynClone.Z = 2813;
dunwynClone.Heading = 3292;
GameNpcInventoryTemplate template = new GameNpcInventoryTemplate();
template.AddNPCEquipment(eInventorySlot.TorsoArmor, 798);
template.AddNPCEquipment(eInventorySlot.RightHandWeapon, 19);
dunwynClone.Inventory = template.CloseTemplate();
dunwynClone.SwitchWeapon(GameLiving.eActiveWeaponSlot.Standard);
// dunwynClone.AddNPCEquipment((byte) eEquipmentItems.TORSO, 798, 0, 0, 0);
// dunwynClone.AddNPCEquipment((byte) eEquipmentItems.RIGHT_HAND, 19, 0, 0, 0);
StandardMobBrain brain = new StandardMobBrain();
brain.AggroLevel = 0;
brain.AggroRange = 0;
dunwynClone.SetOwnBrain(brain);
dunwynClone.AddToWorld();
GameEventMgr.AddHandler(dunwynClone, GameLivingEvent.Interact, new DOLEventHandler(TalkToMasterDunwynClone));
foreach (GamePlayer visPlayer in dunwynClone.GetPlayersInRadius(WorldMgr.VISIBILITY_DISTANCE))
{
visPlayer.Out.SendEmoteAnimation(dunwynClone, eEmote.Bind);
}
}
else
{
TeleportTo(dunwynClone, dunwynClone, locationDunwynClone);
}
}
示例2: CreateBriediClone
protected void CreateBriediClone()
{
if (briediClone == null)
{
briediClone = new GameNPC();
briediClone.Name = briedi.Name;
briediClone.Model = briedi.Model;
briediClone.GuildName = briedi.GuildName;
briediClone.Realm = briedi.Realm;
briediClone.CurrentRegionID = locationBriediClone.RegionID;
briediClone.Size = briedi.Size;
briediClone.Level = 15; // to make the figthing against fairy sorceress a bit more dramatic :)
briediClone.X = locationBriediClone.X + Util.Random(-150, 150);
briediClone.Y = locationBriediClone.X + Util.Random(-150, 150);
briediClone.Z = locationBriediClone.Y;
briediClone.Heading = locationBriediClone.Heading;
GameNpcInventoryTemplate template = new GameNpcInventoryTemplate();
template.AddNPCEquipment(eInventorySlot.TorsoArmor, 348);
template.AddNPCEquipment(eInventorySlot.LegsArmor, 349);
template.AddNPCEquipment(eInventorySlot.ArmsArmor, 350);
template.AddNPCEquipment(eInventorySlot.HandsArmor, 351);
template.AddNPCEquipment(eInventorySlot.FeetArmor, 352);
template.AddNPCEquipment(eInventorySlot.TwoHandWeapon, 640);
briediClone.Inventory = template.CloseTemplate();
briediClone.SwitchWeapon(GameLiving.eActiveWeaponSlot.TwoHanded);
// briediClone.AddNPCEquipment((byte) eEquipmentItems.TORSO, 348, 0, 0, 0);
// briediClone.AddNPCEquipment((byte) eEquipmentItems.LEGS, 349, 0, 0, 0);
// briediClone.AddNPCEquipment((byte) eEquipmentItems.ARMS, 350, 0, 0, 0);
// briediClone.AddNPCEquipment((byte) eEquipmentItems.HAND, 351, 0, 0, 0);
// briediClone.AddNPCEquipment((byte) eEquipmentItems.FEET, 352, 0, 0, 0);
// briediClone.AddNPCEquipment((byte) eEquipmentItems.TWO_HANDED, 640, 0, 0, 0);
StandardMobBrain brain = new StandardMobBrain();
brain.AggroLevel = 0;
brain.AggroRange = 0;
briediClone.SetOwnBrain(brain);
briediClone.AddToWorld();
GameEventMgr.AddHandler(briediClone, GameLivingEvent.Interact, new DOLEventHandler(TalkToMasterBriediClone));
foreach (GamePlayer visPlayer in briediClone.GetPlayersInRadius(WorldMgr.VISIBILITY_DISTANCE))
{
visPlayer.Out.SendEmoteAnimation(briediClone, eEmote.Bind);
}
}
else
{
TeleportTo(briediClone, briediClone, locationBriediClone);
}
}