164 num = ((coinValue <
_expirationCompSilver) ? ((
int)
MathHelper.
Lerp(0f, 3600f,
Utils.
GetLerpValue(
_expirationCompCopper,
_expirationCompSilver, coinValue))) : ((coinValue <
_expirationCompGold) ? ((
int)
MathHelper.
Lerp(36000f, 108000f,
Utils.
GetLerpValue(
_expirationCompSilver,
_expirationCompGold, coinValue))) : ((coinValue >=
_expirationCompPlat) ? 432000 : ((int)
MathHelper.
Lerp(108000f, 216000f,
Utils.
GetLerpValue(
_expirationCompSilver,
_expirationCompGold, coinValue))))));
184 Point point =
nPC.position.ToTileCoordinates();
187 nPC.netUpdate =
true;
189 nPC.timeLeft += 3600;
194 nPC.life = (int)((
float)nPC.lifeMax *
num2);
239 return (
double)playerTarget.position.Y < Main.worldSurface * 16.0;
315 Vector2 coords = reader.ReadVector2();
402 for (
int i = 0; i < 255; i++)
void Draw(Texture2D texture, Vector2 position, Color color)
static float Lerp(float value1, float value2, float amount)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
virtual bool ReadBoolean()
virtual float ReadSingle()
static byte Max(byte val1, byte val2)
bool RespawnAttemptLocked
static readonly int _expirationCompPlat
bool IsExpired(int gameTime)
bool WouldNPCBeDiscouraged(Player playerTarget)
static readonly int _expirationCompSilver
static readonly int _expirationCompCopper
bool DrawMapIcon(SpriteBatch spriteBatch, Vector2 mapTopLeft, Vector2 mapX2Y2AndOff, Rectangle? mapRect, float mapScale, float drawScale, int gameTime)
static readonly Vector2 EnemyBoxSize
const int ENEMY_BOX_WIDTH
bool Intersects(Rectangle rectInner, Rectangle rectOuter)
void WriteSelfTo(BinaryWriter writer)
static int _uniqueIDCounter
readonly float _baseValue
int CalculateExpirationTime(int gameCacheTime, int coinValue)
readonly int _npcAIStyleAgainstDiscouragement
readonly int _npcTypeAgainstDiscouragement
readonly int _expirationTime
const int ENEMY_BOX_HEIGHT
void UseMouseOver(SpriteBatch spriteBatch, ref string mouseTextString, float drawScale=1f)
readonly float _npcHPPercent
readonly Rectangle _hitbox
readonly bool _spawnedFromStatue
void SetRespawnAttemptLock(bool state)
static readonly int _expirationCompGold
readonly Vector2 _location
RevengeMarker(Vector2 coords, int npcNetId, float npcHPPercent, int npcType, int npcAiStyle, int coinValue, float baseValue, bool spawnedFromStatue, int gameTime, int uniqueID=-1)
static int MinimumCoinsForCaching
RevengeMarker DrawMapIcons(SpriteBatch spriteBatch, Vector2 mapTopLeft, Vector2 mapX2Y2AndOff, Rectangle? mapRect, float mapScale, float drawScale, ref string unused)
void AddMarker(RevengeMarker marker)
List< RevengeMarker > _markers
const int PLAYER_BOX_WIDTH_INNER
const int PLAYER_BOX_HEIGHT_OUTER
readonly object _markersLock
const int PLAYER_BOX_HEIGHT_INNER
static readonly Vector2 _playerBoxSizeInner
void RemoveExpiredOrInvalidMarkers()
void AddMarkerFromReader(BinaryReader reader)
void DestroyMarker(int markerUniqueID)
void SendAllMarkersToPlayer(int plr)
static bool DisplayCaching
const int PLAYER_BOX_WIDTH_OUTER
static readonly Vector2 _playerBoxSizeOuter
static Asset< Texture2D > MapDeath
static Asset< Texture2D >[] Coin
static Dictionary< int, int > SpecialSpawningRules
static Dictionary< int, int > RespawnEnemyID
static int buyPrice(int platinum=0, int gold=0, int silver=0, int copper=0)
static Vector2 MouseScreen
static void NewText(string newText, byte R=byte.MaxValue, byte G=byte.MaxValue, byte B=byte.MaxValue)
static int GetNPCInvasionGroup(int npcID)
static bool DespawnEncouragement_AIStyle2_FloatingEye_IsDiscouraged(int npcID, Vector2 npcPosition, int target=255)
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
static bool DespawnEncouragement_AIStyle3_Fighters_NotDiscouraged(int npcID, Vector2 position, NPC npcInstance)
static void SendData(int msgType, int remoteClient=-1, int ignoreClient=-1, NetworkText text=null, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
static void SendCoinLossRevengeMarker(CoinLossRevengeSystem.RevengeMarker marker, int remoteClient=-1, int ignoreClient=-1)
static void DrawMoney(SpriteBatch sb, string text, float shopx, float shopy, int[] coinsArray, bool horizontal=false)
static int[] CoinsSplit(long count)
static float GetLerpValue(float from, float to, float t, bool clamped=false)
static Rectangle CenteredRectangle(Vector2 center, Vector2 size)