20169 {
20170
20171
20172
20173
20174 if (Main.wofNPCIndex < 0 || !Main.npc[Main.wofNPCIndex].active)
20175 {
20176 return;
20177 }
20178 float num = Main.npc[Main.wofNPCIndex].position.X + 40
f;
20179 if (Main.npc[Main.wofNPCIndex].direction > 0)
20180 {
20182 }
20184 {
20188 }
20190 {
20192 SoundEngine.
PlaySound(4, (
int)Main.npc[Main.wofNPCIndex].position.X, (
int)Main.npc[Main.wofNPCIndex].position.Y, 10);
20193 }
20195 {
20196 if (
position.Y < (
float)(Main.UnderworldLayer * 16))
20197 {
20199 }
20200 if (Main.npc[Main.wofNPCIndex].direction < 0)
20201 {
20202 if (
position.X + (
float)(
width / 2) > Main.npc[Main.wofNPCIndex].position.X + (
float)(Main.npc[Main.wofNPCIndex].width / 2) + 40
f)
20203 {
20205 }
20206 }
20207 else if (
position.X + (
float)(
width / 2) < Main.npc[Main.wofNPCIndex].position.X + (
float)(Main.npc[Main.wofNPCIndex].width / 2) - 40
f)
20208 {
20210 }
20211 }
20213 {
20214 return;
20215 }
20218 for (int i = 0; i < 1000; i++)
20219 {
20220 if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].aiStyle == 7)
20221 {
20222 Main.projectile[i].Kill();
20223 }
20224 }
20226 float num3 = Main.npc[Main.wofNPCIndex].position.X + (float)(Main.npc[Main.wofNPCIndex].width / 2) -
center.X;
20227 float num2 = Main.npc[Main.wofNPCIndex].position.Y + (float)(Main.npc[Main.wofNPCIndex].height / 2) -
center.Y;
20229 {
20231 }
20232 else if (Main.npc[Main.wofNPCIndex].position.X < 608
f || Main.npc[Main.wofNPCIndex].position.X > (
float)((Main.maxTilesX - 38) * 16))
20233 {
20235 }
20236 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
static PlayerDeathReason ByOther(int type, int playerIndex=-1)
static PlayerDeathReason LegacyDefault()
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
void KillMe(PlayerDeathReason damageSource, double dmg, int hitDirection, bool pvp=false)
double Hurt(PlayerDeathReason damageSource, int Damage, int hitDirection, bool pvp, bool quiet, bool Crit, int cooldownCounter, bool dodgeable=true, float armorPenetration=0f)
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Gives the player the provided buff. This accounts for if the player is immune to the buff....