TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ DrawMapIcons_PotionOfReturnAppearAfterUsePosition()

void Terraria.Main.DrawMapIcons_PotionOfReturnAppearAfterUsePosition ( SpriteBatch spriteBatch,
Vector2 mapTopLeft,
Vector2 mapX2Y2AndOff,
Rectangle? mapRect,
float mapScale,
float drawScale,
ref string mouseTextString )
inlineprivate

Definition at line 71984 of file Main.cs.

71985 {
71986 //IL_0048: Unknown result type (might be due to invalid IL or missing references)
71987 //IL_004d: Unknown result type (might be due to invalid IL or missing references)
71988 //IL_004e: Unknown result type (might be due to invalid IL or missing references)
71989 //IL_005c: Unknown result type (might be due to invalid IL or missing references)
71990 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
71991 //IL_006b: Unknown result type (might be due to invalid IL or missing references)
71992 //IL_006c: Unknown result type (might be due to invalid IL or missing references)
71993 //IL_0071: Unknown result type (might be due to invalid IL or missing references)
71994 //IL_0072: Unknown result type (might be due to invalid IL or missing references)
71995 //IL_0075: Unknown result type (might be due to invalid IL or missing references)
71996 //IL_007a: Unknown result type (might be due to invalid IL or missing references)
71997 //IL_007b: Unknown result type (might be due to invalid IL or missing references)
71998 //IL_007c: Unknown result type (might be due to invalid IL or missing references)
71999 //IL_007d: Unknown result type (might be due to invalid IL or missing references)
72000 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
72001 //IL_0083: Unknown result type (might be due to invalid IL or missing references)
72002 //IL_0084: Unknown result type (might be due to invalid IL or missing references)
72003 //IL_0089: Unknown result type (might be due to invalid IL or missing references)
72004 //IL_00c8: Unknown result type (might be due to invalid IL or missing references)
72005 //IL_00cd: Unknown result type (might be due to invalid IL or missing references)
72006 //IL_00d2: Unknown result type (might be due to invalid IL or missing references)
72007 //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
72008 //IL_00da: Unknown result type (might be due to invalid IL or missing references)
72009 //IL_00e4: Unknown result type (might be due to invalid IL or missing references)
72010 //IL_00e6: Unknown result type (might be due to invalid IL or missing references)
72011 //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
72012 //IL_0102: Unknown result type (might be due to invalid IL or missing references)
72013 //IL_0103: Unknown result type (might be due to invalid IL or missing references)
72014 //IL_0105: Unknown result type (might be due to invalid IL or missing references)
72015 //IL_010c: Unknown result type (might be due to invalid IL or missing references)
72016 //IL_0111: Unknown result type (might be due to invalid IL or missing references)
72017 //IL_0116: Unknown result type (might be due to invalid IL or missing references)
72018 //IL_011a: Unknown result type (might be due to invalid IL or missing references)
72019 //IL_011f: Unknown result type (might be due to invalid IL or missing references)
72020 //IL_0095: Unknown result type (might be due to invalid IL or missing references)
72021 //IL_009a: Unknown result type (might be due to invalid IL or missing references)
72022 //IL_009e: Unknown result type (might be due to invalid IL or missing references)
72023 //IL_009f: Unknown result type (might be due to invalid IL or missing references)
72024 //IL_0138: Unknown result type (might be due to invalid IL or missing references)
72025 //IL_0142: Unknown result type (might be due to invalid IL or missing references)
72026 //IL_0147: Unknown result type (might be due to invalid IL or missing references)
72027 //IL_0156: Unknown result type (might be due to invalid IL or missing references)
72028 //IL_015b: Unknown result type (might be due to invalid IL or missing references)
72029 Vector2? potionOfReturnOriginalUsePosition = LocalPlayer.PotionOfReturnOriginalUsePosition;
72031 {
72032 return;
72033 }
72035 Vector2 val2 = default(Vector2);
72036 ((Vector2)(ref val2))._002Ector(0f, (float)(-LocalPlayer.height / 2));
72037 Vector2 vec = (val.HasValue ? new Vector2?(val.GetValueOrDefault() + val2) : null).Value / 16f - mapTopLeft;
72038 vec *= mapScale;
72039 vec += mapX2Y2AndOff;
72040 vec = vec.Floor();
72041 Rectangle val3;
72042 if (mapRect.HasValue)
72043 {
72044 val3 = mapRect.Value;
72045 if (!((Rectangle)(ref val3)).Contains(vec.ToPoint()))
72046 {
72047 return;
72048 }
72049 }
72050 Texture2D value = TextureAssets.Extra[173].Value;
72051 Rectangle rectangle = value.Frame();
72052 spriteBatch.Draw(value, vec, (Rectangle?)rectangle, Color.White, 0f, rectangle.Size() / 2f, drawScale, (SpriteEffects)0, 0f);
72053 val3 = Utils.CenteredRectangle(vec, rectangle.Size() * drawScale);
72054 if (((Rectangle)(ref val3)).Contains(MouseScreen.ToPoint()))
72055 {
72056 mouseTextString = Language.GetTextValue("GameUI.PotionOfReturnExitPortal");
72057 _ = MouseScreen + new Vector2(-28f) + new Vector2(4f, 0f);
72058 }
72059 }
static Asset< Texture2D >[] Extra
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
static SpriteBatch spriteBatch
Definition Main.cs:1043
static Vector2 MouseScreen
Fetches the position of the mouse cursor on the screen. Useful for making things visually happen nea...
Definition Main.cs:2938
static Player LocalPlayer
Retrieves the T:Terraria.Player object for the local user. Shorthand for F:Terraria....
Definition Main.cs:3001

References Terraria.Utils.CenteredRectangle(), Terraria.GameContent.TextureAssets.Extra, Terraria.Localization.Language.GetTextValue(), Terraria.Main.LocalPlayer, Terraria.Main.MouseScreen, and Terraria.Main.spriteBatch.

Referenced by Terraria.Main.DrawMiscMapIcons().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: