/// <summary> /// Initializes a new instance of the <see cref="CharacterTemplateTable"/> class. /// </summary> /// <param name="aIID">The initial value for the corresponding property.</param> /// <param name="allianceID">The initial value for the corresponding property.</param> /// <param name="bodyID">The initial value for the corresponding property.</param> /// <param name="chatDialog">The initial value for the corresponding property.</param> /// <param name="exp">The initial value for the corresponding property.</param> /// <param name="giveCash">The initial value for the corresponding property.</param> /// <param name="giveExp">The initial value for the corresponding property.</param> /// <param name="iD">The initial value for the corresponding property.</param> /// <param name="level">The initial value for the corresponding property.</param> /// <param name="moveSpeed">The initial value for the corresponding property.</param> /// <param name="name">The initial value for the corresponding property.</param> /// <param name="respawn">The initial value for the corresponding property.</param> /// <param name="shopID">The initial value for the corresponding property.</param> /// <param name="statPoints">The initial value for the corresponding property.</param> /// <param name="statAgi">The initial value for the corresponding property.</param> /// <param name="statDefence">The initial value for the corresponding property.</param> /// <param name="statInt">The initial value for the corresponding property.</param> /// <param name="statMaxhit">The initial value for the corresponding property.</param> /// <param name="statMaxhp">The initial value for the corresponding property.</param> /// <param name="statMaxmp">The initial value for the corresponding property.</param> /// <param name="statMinhit">The initial value for the corresponding property.</param> /// <param name="statStr">The initial value for the corresponding property.</param> public CharacterTemplateTable(AIID? @aIID, AllianceID @allianceID, BodyID @bodyID, NPCChatDialogID? @chatDialog, Int32 @exp, UInt16 @giveCash, UInt16 @giveExp, CharacterTemplateID @iD, Byte @level, UInt16 @moveSpeed, String @name, UInt16 @respawn, ShopID? @shopID, Int32 @statPoints, Int16 @statAgi, Int16 @statDefence, Int16 @statInt, Int16 @statMaxhit, Int16 @statMaxhp, Int16 @statMaxmp, Int16 @statMinhit, Int16 @statStr) { AIID = @aIID; AllianceID = @allianceID; BodyID = @bodyID; ChatDialog = @chatDialog; Exp = @exp; GiveCash = @giveCash; GiveExp = @giveExp; ID = @iD; Level = @level; MoveSpeed = @moveSpeed; Name = @name; Respawn = @respawn; ShopID = @shopID; StatPoints = @statPoints; SetStat(StatType.Agi, @statAgi); SetStat(StatType.Defence, @statDefence); SetStat(StatType.Int, @statInt); SetStat(StatType.MaxHit, @statMaxhit); SetStat(StatType.MaxHP, @statMaxhp); SetStat(StatType.MaxMP, @statMaxmp); SetStat(StatType.MinHit, @statMinhit); SetStat(StatType.Str, @statStr); }
/// <summary> /// Gets the <see cref="BodyInfo"/> at the given <paramref name="index"/>. /// </summary> /// <param name="index">The index of the body to get.</param> /// <returns>The <see cref="BodyInfo"/> at the given <paramref name="index"/>, or null if the /// <paramref name="index"/> was invalid or no body exists for the given value.</returns> public BodyInfo GetBody(BodyID index) { BodyInfo ret; if (_bodies.TryGetValue(index, out ret)) return ret; return null; }
/// <summary> /// Provides the extra text for the <see cref="AdvancedPropertyDescriptor"/> for a /// <see cref="BodyID"/>. /// </summary> /// <param name="v">The value.</param> /// <returns>The extra text to display.</returns> static string ExtraTextProvider_BodyID(BodyID v) { var body = BodyInfoManager.Instance.GetBody(v); if (body == null) { return(null); } return(body.Body + " - Size: " + body.Size.X + "x" + body.Size.Y); }
/// <summary> /// Initializes a new instance of the <see cref="ViewNpcCharacterTable"/> class. /// </summary> /// <param name="aIID">The initial value for the corresponding property.</param> /// <param name="bodyID">The initial value for the corresponding property.</param> /// <param name="cash">The initial value for the corresponding property.</param> /// <param name="characterTemplateID">The initial value for the corresponding property.</param> /// <param name="chatDialog">The initial value for the corresponding property.</param> /// <param name="exp">The initial value for the corresponding property.</param> /// <param name="hP">The initial value for the corresponding property.</param> /// <param name="iD">The initial value for the corresponding property.</param> /// <param name="level">The initial value for the corresponding property.</param> /// <param name="loadMapID">The initial value for the corresponding property.</param> /// <param name="loadX">The initial value for the corresponding property.</param> /// <param name="loadY">The initial value for the corresponding property.</param> /// <param name="moveSpeed">The initial value for the corresponding property.</param> /// <param name="mP">The initial value for the corresponding property.</param> /// <param name="name">The initial value for the corresponding property.</param> /// <param name="respawnMapID">The initial value for the corresponding property.</param> /// <param name="respawnX">The initial value for the corresponding property.</param> /// <param name="respawnY">The initial value for the corresponding property.</param> /// <param name="shopID">The initial value for the corresponding property.</param> /// <param name="statPoints">The initial value for the corresponding property.</param> /// <param name="statAgi">The initial value for the corresponding property.</param> /// <param name="statDefence">The initial value for the corresponding property.</param> /// <param name="statInt">The initial value for the corresponding property.</param> /// <param name="statMaxhit">The initial value for the corresponding property.</param> /// <param name="statMaxhp">The initial value for the corresponding property.</param> /// <param name="statMaxmp">The initial value for the corresponding property.</param> /// <param name="statMinhit">The initial value for the corresponding property.</param> /// <param name="statStr">The initial value for the corresponding property.</param> public ViewNpcCharacterTable(AIID? @aIID, BodyID @bodyID, Int32 @cash, CharacterTemplateID? @characterTemplateID, NPCChatDialogID? @chatDialog, Int32 @exp, SPValueType @hP, Int32 @iD, Byte @level, MapID @loadMapID, UInt16 @loadX, UInt16 @loadY, UInt16 @moveSpeed, SPValueType @mP, String @name, MapID? @respawnMapID, Single @respawnX, Single @respawnY, ShopID? @shopID, Int32 @statPoints, Int16 @statAgi, Int16 @statDefence, Int16 @statInt, Int16 @statMaxhit, Int16 @statMaxhp, Int16 @statMaxmp, Int16 @statMinhit, Int16 @statStr) { AIID = @aIID; BodyID = @bodyID; Cash = @cash; CharacterTemplateID = @characterTemplateID; ChatDialog = @chatDialog; Exp = @exp; HP = @hP; ID = @iD; Level = @level; LoadMapID = @loadMapID; LoadX = @loadX; LoadY = @loadY; MoveSpeed = @moveSpeed; MP = @mP; Name = @name; RespawnMapID = @respawnMapID; RespawnX = @respawnX; RespawnY = @respawnY; ShopID = @shopID; StatPoints = @statPoints; StatAgi = @statAgi; StatDefence = @statDefence; StatInt = @statInt; StatMaxhit = @statMaxhit; StatMaxhp = @statMaxhp; StatMaxmp = @statMaxmp; StatMinhit = @statMinhit; StatStr = @statStr; }
/// <summary> /// Initializes a new instance of the <see cref="CharacterTable"/> class. /// </summary> /// <param name="aIID">The initial value for the corresponding property.</param> /// <param name="bodyID">The initial value for the corresponding property.</param> /// <param name="cash">The initial value for the corresponding property.</param> /// <param name="characterTemplateID">The initial value for the corresponding property.</param> /// <param name="chatDialog">The initial value for the corresponding property.</param> /// <param name="exp">The initial value for the corresponding property.</param> /// <param name="hP">The initial value for the corresponding property.</param> /// <param name="iD">The initial value for the corresponding property.</param> /// <param name="level">The initial value for the corresponding property.</param> /// <param name="loadMapID">The initial value for the corresponding property.</param> /// <param name="loadX">The initial value for the corresponding property.</param> /// <param name="loadY">The initial value for the corresponding property.</param> /// <param name="moveSpeed">The initial value for the corresponding property.</param> /// <param name="mP">The initial value for the corresponding property.</param> /// <param name="name">The initial value for the corresponding property.</param> /// <param name="respawnMapID">The initial value for the corresponding property.</param> /// <param name="respawnX">The initial value for the corresponding property.</param> /// <param name="respawnY">The initial value for the corresponding property.</param> /// <param name="shopID">The initial value for the corresponding property.</param> /// <param name="statPoints">The initial value for the corresponding property.</param> /// <param name="statAgi">The initial value for the corresponding property.</param> /// <param name="statDefence">The initial value for the corresponding property.</param> /// <param name="statInt">The initial value for the corresponding property.</param> /// <param name="statMaxhit">The initial value for the corresponding property.</param> /// <param name="statMaxhp">The initial value for the corresponding property.</param> /// <param name="statMaxmp">The initial value for the corresponding property.</param> /// <param name="statMinhit">The initial value for the corresponding property.</param> /// <param name="statStr">The initial value for the corresponding property.</param> public CharacterTable(AIID? @aIID, BodyID @bodyID, Int32 @cash, CharacterTemplateID? @characterTemplateID, NPCChatDialogID? @chatDialog, Int32 @exp, SPValueType @hP, CharacterID @iD, Byte @level, MapID @loadMapID, UInt16 @loadX, UInt16 @loadY, UInt16 @moveSpeed, SPValueType @mP, String @name, MapID? @respawnMapID, Single @respawnX, Single @respawnY, ShopID? @shopID, Int32 @statPoints, Int16 @statAgi, Int16 @statDefence, Int16 @statInt, Int16 @statMaxhit, Int16 @statMaxhp, Int16 @statMaxmp, Int16 @statMinhit, Int16 @statStr) { AIID = @aIID; BodyID = @bodyID; Cash = @cash; CharacterTemplateID = @characterTemplateID; ChatDialog = @chatDialog; Exp = @exp; HP = @hP; ID = @iD; Level = @level; LoadMapID = @loadMapID; LoadX = @loadX; LoadY = @loadY; MoveSpeed = @moveSpeed; MP = @mP; Name = @name; RespawnMapID = @respawnMapID; RespawnX = @respawnX; RespawnY = @respawnY; ShopID = @shopID; StatPoints = @statPoints; SetStat(StatType.Agi, @statAgi); SetStat(StatType.Defence, @statDefence); SetStat(StatType.Int, @statInt); SetStat(StatType.MaxHit, @statMaxhit); SetStat(StatType.MaxHP, @statMaxhp); SetStat(StatType.MaxMP, @statMaxmp); SetStat(StatType.MinHit, @statMinhit); SetStat(StatType.Str, @statStr); }
/// <summary> /// Initializes a new instance of the <see cref="AccountCharacterInfo"/> class. /// </summary> /// <param name="index">The index.</param> /// <param name="name">The name.</param> /// <param name="bodyID">The ID of the body.</param> public AccountCharacterInfo(byte index, string name, BodyID bodyID) { Index = index; Name = name; BodyID = bodyID; }
/// <summary> /// Provides the extra text for the <see cref="AdvancedPropertyDescriptor"/> for a /// <see cref="BodyID"/>. /// </summary> /// <param name="v">The value.</param> /// <returns>The extra text to display.</returns> static string ExtraTextProvider_BodyID(BodyID v) { var body = BodyInfoManager.Instance.GetBody(v); if (body == null) return null; return body.Body + " - Size: " + body.Size.X + "x" + body.Size.Y; }
/// <summary> /// Initializes a new instance of the <see cref="BodyInfo"/> class. /// </summary> /// <param name="id">The <see cref="BodyID"/>.</param> public BodyInfo(BodyID id) { ID = id; }
/// <summary> /// Deletes a <see cref="BodyInfo"/> in this <see cref="BodyInfoManager"/>. /// </summary> /// <param name="id">The <see cref="BodyID"/> of the body to remove.</param> /// <returns>True if a <see cref="BodyInfo"/> was removed from the given <paramref name="id"/>; otherwise false.</returns> /// <remarks> /// Should only be used in the editor. /// </remarks> public bool RemoveBody(BodyID id) { return _bodies.Remove(id); }
/// <summary> /// Gets the next free <see cref="BodyID"/>. /// </summary> /// <returns>The next free <see cref="BodyID"/>.</returns> BodyID GetNextFreeID() { var i = new BodyID(1); while (_bodies.ContainsKey(i)) { i++; } return i; }