本文整理汇总了C#中SmokeLounge.AOtomation.Messaging.GameData.Identity.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Identity.ToString方法的具体用法?C# Identity.ToString怎么用?C# Identity.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SmokeLounge.AOtomation.Messaging.GameData.Identity
的用法示例。
在下文中一共展示了Identity.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PooledObject
/// <summary>
/// </summary>
/// <param name="pooledIn">
/// </param>
/// <param name="parent">
/// </param>
/// <param name="id">
/// </param>
public PooledObject(Identity parent, Identity id)
{
this.Identity = id;
this.Parent = parent;
Pool.Instance.AddObject(parent, this);
LogUtil.Debug(
DebugInfoDetail.Pool,
"Created new object " + id.ToString(true) + " of " + parent.ToString(true));
}
示例2: InstantiateMobSpawn
public static ICharacter InstantiateMobSpawn(
DBMobSpawn mob,
DBMobSpawnStat[] stats,
IController npccontroller,
IPlayfield playfield)
{
if (playfield != null)
{
Identity mobId = new Identity() { Type = IdentityType.CanbeAffected, Instance = mob.Id };
if (Pool.Instance.GetObject(playfield.Identity, mobId) != null)
{
throw new Exception("Object " + mobId.ToString(true) + " already exists!!");
}
Character cmob = new Character(playfield.Identity, mobId, npccontroller);
cmob.Read();
cmob.Playfield = playfield;
cmob.Coordinates(new Coordinate() { x = mob.X, y = mob.Y, z = mob.Z });
cmob.RawHeading = new Quaternion(mob.HeadingX, mob.HeadingY, mob.HeadingZ, mob.HeadingW);
cmob.Name = mob.Name;
cmob.FirstName = "";
cmob.LastName = "";
foreach (DBMobSpawnStat stat in stats)
{
cmob.Stats.SetBaseValueWithoutTriggering(stat.Stat, (uint)stat.Value);
}
cmob.Stats.SetBaseValueWithoutTriggering((int)StatIds.visualprofession, cmob.Stats[StatIds.profession].BaseValue);
// initiate affected stats calculation
int temp = cmob.Stats[StatIds.level].Value;
temp = cmob.Stats[StatIds.agility].Value;
temp = cmob.Stats[StatIds.headmesh].Value;
cmob.MeshLayer.AddMesh(0, cmob.Stats[StatIds.headmesh].Value, 0, 4);
cmob.SocialMeshLayer.AddMesh(0, cmob.Stats[StatIds.headmesh].Value, 0, 4);
List<MobSpawnWaypoint> waypoints =
MessagePackZip.DeserializeData<MobSpawnWaypoint>(mob.Waypoints.ToArray());
foreach (MobSpawnWaypoint wp in waypoints)
{
Waypoint mobwp = new Waypoint();
mobwp.Position.x = wp.X;
mobwp.Position.y = wp.Y;
mobwp.Position.z = wp.Z;
mobwp.Running = wp.WalkMode == 1;
cmob.Waypoints.Add(mobwp);
}
npccontroller.Character = cmob;
if (cmob.Waypoints.Count > 2)
{
cmob.Controller.State = CharacterState.Patrolling;
}
cmob.DoNotDoTimers = false;
return cmob;
}
return null;
}
示例3: Add
public bool Add(Identity from, IItem item)
{
if (from.Equals(this.Shopper))
{
this.vendorsBag.Add(this.vendorsBag.FindFreeSlot(), item);
LogUtil.Debug(DebugInfoDetail.Shopping, "Added Item from character " + from.ToString(true));
}
else
{
this.charactersBag.Add(from.Instance);
LogUtil.Debug(DebugInfoDetail.Shopping, "Added Item from shop on position " + from.ToString(true));
}
// For now no invalid trades
return true;
}