ace/Source/ACE.Entity/CharacterPositionExtensions.cs
Mag-nus 99fb8bcc55
All this does is cleanup a bunch of style issues that Resharper complains about (#629)
* Removed unused using statements

* Removed redudnant ToString()'s

* Removed some redundant type casts

* Removed redundant bool comparisons

* remove redundant initializers

* xml summary in invalid place switched to comments

* Use string interpolation

* use format separators

* Removed redundant parenths

* remove redundant else

* direct cast when safe

* redundant string interpolation

* xml summary fixes

* removed empty ctors

* fix modifier order

* Convert to auto property

* Convert some getters to method bodies

* use format separators

* changelog

* Auto-properties that can made to get-only

* fixed some references in XML comments

* remove redundant base()

* Revert "Auto-properties that can made to get-only"

This reverts commit 32a1225ce8.

* fix starter gear json

* Use collections count property

* simplify conditional ternary expression

* remove redundant return statements

* Constructors for abstract classes changed to protected

* Moved declarations to inner scopes

* Join declaration and assignments

* inline out variables

* Use enum extension methods instead of static methods

* inline out more variables

* more unused usings

* Remove specifying enums as ints
2018-02-09 06:46:49 -06:00

45 lines
1.3 KiB
C#

namespace ACE.Entity
{
public class CharacterPositionExtensions
{
private enum StarterTown : uint
{
Holtburg = 0,
Shoushi = 1,
Yaraq = 2,
Sanamar = 3
}
public static Position StartingPosition(uint startArea)
{
uint landblockID;
switch (startArea)
{
case (uint)StarterTown.Shoushi:
landblockID = 2130903469;
break;
case (uint)StarterTown.Yaraq:
landblockID = 2349072813;
break;
case (uint)StarterTown.Sanamar:
landblockID = 1912799661;
break;
default:
landblockID = 2248343981;
break;
}
var startingPosition = new Position(landblockID, 12.3199f, -28.482f, 0.0049999995f, 0.0f, 0.0f, -0.9408059f, -0.3389459f);
return startingPosition;
}
public static Position InvalidPosition(uint characterId)
{
var invalidPosition = new Position();
invalidPosition.LandblockId = new LandblockId();
return invalidPosition;
}
}
}