C# Class Terraria.ModLoader.GlobalNPC

ファイルを表示 Open project: bluemagic123/tModLoader Class Usage Examples

Public Methods

Method Description
AI ( Terraria.NPC npc ) : void
Autoload ( string &name ) : bool
BossHeadRotation ( Terraria.NPC npc, float &rotation ) : void
BossHeadSlot ( Terraria.NPC npc, int &index ) : void
BossHeadSpriteEffects ( Terraria.NPC npc, SpriteEffects &spriteEffects ) : void
BuffTownNPC ( float &damageMult, int &defense ) : void
CanBeHitByItem ( Terraria.NPC npc, Player player, Item item ) : bool?
CanBeHitByProjectile ( Terraria.NPC npc, Projectile projectile ) : bool?
CanHitNPC ( Terraria.NPC npc, Terraria.NPC target ) : bool?
CanHitPlayer ( Terraria.NPC npc, Player target, int &cooldownSlot ) : bool
CheckActive ( Terraria.NPC npc ) : bool
CheckDead ( Terraria.NPC npc ) : bool
DrawEffects ( Terraria.NPC npc, Color &drawColor ) : void
DrawHealthBar ( Terraria.NPC npc, byte hbPosition, float &scale, Vector2 &position ) : bool?
DrawTownAttackGun ( Terraria.NPC npc, float &scale, int &item, int &closeness ) : void
DrawTownAttackSwing ( Terraria.NPC npc, Texture2D &item, int &itemSize, float &scale, Vector2 &offset ) : void
EditSpawnPool ( float>.IDictionary pool, Terraria.ModLoader.NPCSpawnInfo spawnInfo ) : void
EditSpawnRange ( Player player, int &spawnRangeX, int &spawnRangeY, int &safeRangeX, int &safeRangeY ) : void
EditSpawnRate ( Player player, int &spawnRate, int &maxSpawns ) : void
FindFrame ( Terraria.NPC npc, int frameHeight ) : void
GetAlpha ( Terraria.NPC npc, Color drawColor ) : Color?
GetChat ( Terraria.NPC npc, string &chat ) : void
HitEffect ( Terraria.NPC npc, int hitDirection, double damage ) : void
ModifyHitByItem ( Terraria.NPC npc, Player player, Item item, int &damage, float &knockback, bool &crit ) : void
ModifyHitByProjectile ( Terraria.NPC npc, Projectile projectile, int &damage, float &knockback, bool &crit, int &hitDirection ) : void
ModifyHitNPC ( Terraria.NPC npc, Terraria.NPC target, int &damage, float &knockback, bool &crit ) : void
ModifyHitPlayer ( Terraria.NPC npc, Player target, int &damage, bool &crit ) : void
NPCLoot ( Terraria.NPC npc ) : void
OnHitByItem ( Terraria.NPC npc, Player player, Item item, int damage, float knockback, bool crit ) : void
OnHitByProjectile ( Terraria.NPC npc, Projectile projectile, int damage, float knockback, bool crit ) : void
OnHitNPC ( Terraria.NPC npc, Terraria.NPC target, int damage, float knockback, bool crit ) : void
OnHitPlayer ( Terraria.NPC npc, Player target, int damage, bool crit ) : void
PostAI ( Terraria.NPC npc ) : void
PostDraw ( Terraria.NPC npc, SpriteBatch spriteBatch, Color drawColor ) : void
PreAI ( Terraria.NPC npc ) : bool
PreDraw ( Terraria.NPC npc, SpriteBatch spriteBatch, Color drawColor ) : bool
PreNPCLoot ( Terraria.NPC npc ) : bool
ResetEffects ( Terraria.NPC npc ) : void
ScaleExpertStats ( Terraria.NPC npc, int numPlayers, float bossLifeScale ) : void
SetDefaults ( Terraria.NPC npc ) : void
SetupShop ( int type, Chest shop, int &nextSlot ) : void
SetupTravelShop ( int shop, int &nextSlot ) : void
SpawnNPC ( int npc, int tileX, int tileY ) : void
StrikeNPC ( Terraria.NPC npc, double &damage, int defense, float &knockback, int hitDirection, bool &crit ) : bool
TownNPCAttackCooldown ( Terraria.NPC npc, int &cooldown, int &randExtraCooldown ) : void
TownNPCAttackMagic ( Terraria.NPC npc, float &auraLightMultiplier ) : void
TownNPCAttackProj ( Terraria.NPC npc, int &projType, int &attackDelay ) : void
TownNPCAttackProjSpeed ( Terraria.NPC npc, float &multiplier, float &gravityCorrection, float &randomOffset ) : void
TownNPCAttackShoot ( Terraria.NPC npc, bool &inBetweenShots ) : void
TownNPCAttackStrength ( Terraria.NPC npc, int &damage, float &knockback ) : void
TownNPCAttackSwing ( Terraria.NPC npc, int &itemWidth, int &itemHeight ) : void
UpdateLifeRegen ( Terraria.NPC npc, int &damage ) : void

Method Details

AI() public method

public AI ( Terraria.NPC npc ) : void
npc Terraria.NPC
return void

Autoload() public method

public Autoload ( string &name ) : bool
name string
return bool

BossHeadRotation() public method

public BossHeadRotation ( Terraria.NPC npc, float &rotation ) : void
npc Terraria.NPC
rotation float
return void

BossHeadSlot() public method

public BossHeadSlot ( Terraria.NPC npc, int &index ) : void
npc Terraria.NPC
index int
return void

BossHeadSpriteEffects() public method

public BossHeadSpriteEffects ( Terraria.NPC npc, SpriteEffects &spriteEffects ) : void
npc Terraria.NPC
spriteEffects SpriteEffects
return void

BuffTownNPC() public method

public BuffTownNPC ( float &damageMult, int &defense ) : void
damageMult float
defense int
return void

CanBeHitByItem() public method

public CanBeHitByItem ( Terraria.NPC npc, Player player, Item item ) : bool?
npc Terraria.NPC
player Terraria.Player
item Item
return bool?

CanBeHitByProjectile() public method

public CanBeHitByProjectile ( Terraria.NPC npc, Projectile projectile ) : bool?
npc Terraria.NPC
projectile Terraria.Projectile
return bool?

CanHitNPC() public method

public CanHitNPC ( Terraria.NPC npc, Terraria.NPC target ) : bool?
npc Terraria.NPC
target Terraria.NPC
return bool?

CanHitPlayer() public method

public CanHitPlayer ( Terraria.NPC npc, Player target, int &cooldownSlot ) : bool
npc Terraria.NPC
target Terraria.Player
cooldownSlot int
return bool

CheckActive() public method

public CheckActive ( Terraria.NPC npc ) : bool
npc Terraria.NPC
return bool

CheckDead() public method

public CheckDead ( Terraria.NPC npc ) : bool
npc Terraria.NPC
return bool

DrawEffects() public method

public DrawEffects ( Terraria.NPC npc, Color &drawColor ) : void
npc Terraria.NPC
drawColor Color
return void

DrawHealthBar() public method

public DrawHealthBar ( Terraria.NPC npc, byte hbPosition, float &scale, Vector2 &position ) : bool?
npc Terraria.NPC
hbPosition byte
scale float
position Vector2
return bool?

DrawTownAttackGun() public method

public DrawTownAttackGun ( Terraria.NPC npc, float &scale, int &item, int &closeness ) : void
npc Terraria.NPC
scale float
item int
closeness int
return void

DrawTownAttackSwing() public method

public DrawTownAttackSwing ( Terraria.NPC npc, Texture2D &item, int &itemSize, float &scale, Vector2 &offset ) : void
npc Terraria.NPC
item Texture2D
itemSize int
scale float
offset Vector2
return void

EditSpawnPool() public method

public EditSpawnPool ( float>.IDictionary pool, Terraria.ModLoader.NPCSpawnInfo spawnInfo ) : void
pool float>.IDictionary
spawnInfo Terraria.ModLoader.NPCSpawnInfo
return void

EditSpawnRange() public method

public EditSpawnRange ( Player player, int &spawnRangeX, int &spawnRangeY, int &safeRangeX, int &safeRangeY ) : void
player Terraria.Player
spawnRangeX int
spawnRangeY int
safeRangeX int
safeRangeY int
return void

EditSpawnRate() public method

public EditSpawnRate ( Player player, int &spawnRate, int &maxSpawns ) : void
player Terraria.Player
spawnRate int
maxSpawns int
return void

FindFrame() public method

public FindFrame ( Terraria.NPC npc, int frameHeight ) : void
npc Terraria.NPC
frameHeight int
return void

GetAlpha() public method

public GetAlpha ( Terraria.NPC npc, Color drawColor ) : Color?
npc Terraria.NPC
drawColor Color
return Color?

GetChat() public method

public GetChat ( Terraria.NPC npc, string &chat ) : void
npc Terraria.NPC
chat string
return void

HitEffect() public method

public HitEffect ( Terraria.NPC npc, int hitDirection, double damage ) : void
npc Terraria.NPC
hitDirection int
damage double
return void

ModifyHitByItem() public method

public ModifyHitByItem ( Terraria.NPC npc, Player player, Item item, int &damage, float &knockback, bool &crit ) : void
npc Terraria.NPC
player Terraria.Player
item Item
damage int
knockback float
crit bool
return void

ModifyHitByProjectile() public method

public ModifyHitByProjectile ( Terraria.NPC npc, Projectile projectile, int &damage, float &knockback, bool &crit, int &hitDirection ) : void
npc Terraria.NPC
projectile Terraria.Projectile
damage int
knockback float
crit bool
hitDirection int
return void

ModifyHitNPC() public method

public ModifyHitNPC ( Terraria.NPC npc, Terraria.NPC target, int &damage, float &knockback, bool &crit ) : void
npc Terraria.NPC
target Terraria.NPC
damage int
knockback float
crit bool
return void

ModifyHitPlayer() public method

public ModifyHitPlayer ( Terraria.NPC npc, Player target, int &damage, bool &crit ) : void
npc Terraria.NPC
target Terraria.Player
damage int
crit bool
return void

NPCLoot() public method

public NPCLoot ( Terraria.NPC npc ) : void
npc Terraria.NPC
return void

OnHitByItem() public method

public OnHitByItem ( Terraria.NPC npc, Player player, Item item, int damage, float knockback, bool crit ) : void
npc Terraria.NPC
player Terraria.Player
item Item
damage int
knockback float
crit bool
return void

OnHitByProjectile() public method

public OnHitByProjectile ( Terraria.NPC npc, Projectile projectile, int damage, float knockback, bool crit ) : void
npc Terraria.NPC
projectile Terraria.Projectile
damage int
knockback float
crit bool
return void

OnHitNPC() public method

public OnHitNPC ( Terraria.NPC npc, Terraria.NPC target, int damage, float knockback, bool crit ) : void
npc Terraria.NPC
target Terraria.NPC
damage int
knockback float
crit bool
return void

OnHitPlayer() public method

public OnHitPlayer ( Terraria.NPC npc, Player target, int damage, bool crit ) : void
npc Terraria.NPC
target Terraria.Player
damage int
crit bool
return void

PostAI() public method

public PostAI ( Terraria.NPC npc ) : void
npc Terraria.NPC
return void

PostDraw() public method

public PostDraw ( Terraria.NPC npc, SpriteBatch spriteBatch, Color drawColor ) : void
npc Terraria.NPC
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
drawColor Color
return void

PreAI() public method

public PreAI ( Terraria.NPC npc ) : bool
npc Terraria.NPC
return bool

PreDraw() public method

public PreDraw ( Terraria.NPC npc, SpriteBatch spriteBatch, Color drawColor ) : bool
npc Terraria.NPC
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
drawColor Color
return bool

PreNPCLoot() public method

public PreNPCLoot ( Terraria.NPC npc ) : bool
npc Terraria.NPC
return bool

ResetEffects() public method

public ResetEffects ( Terraria.NPC npc ) : void
npc Terraria.NPC
return void

ScaleExpertStats() public method

public ScaleExpertStats ( Terraria.NPC npc, int numPlayers, float bossLifeScale ) : void
npc Terraria.NPC
numPlayers int
bossLifeScale float
return void

SetDefaults() public method

public SetDefaults ( Terraria.NPC npc ) : void
npc Terraria.NPC
return void

SetupShop() public method

public SetupShop ( int type, Chest shop, int &nextSlot ) : void
type int
shop Terraria.Chest
nextSlot int
return void

SetupTravelShop() public method

public SetupTravelShop ( int shop, int &nextSlot ) : void
shop int
nextSlot int
return void

SpawnNPC() public method

public SpawnNPC ( int npc, int tileX, int tileY ) : void
npc int
tileX int
tileY int
return void

StrikeNPC() public method

public StrikeNPC ( Terraria.NPC npc, double &damage, int defense, float &knockback, int hitDirection, bool &crit ) : bool
npc Terraria.NPC
damage double
defense int
knockback float
hitDirection int
crit bool
return bool

TownNPCAttackCooldown() public method

public TownNPCAttackCooldown ( Terraria.NPC npc, int &cooldown, int &randExtraCooldown ) : void
npc Terraria.NPC
cooldown int
randExtraCooldown int
return void

TownNPCAttackMagic() public method

public TownNPCAttackMagic ( Terraria.NPC npc, float &auraLightMultiplier ) : void
npc Terraria.NPC
auraLightMultiplier float
return void

TownNPCAttackProj() public method

public TownNPCAttackProj ( Terraria.NPC npc, int &projType, int &attackDelay ) : void
npc Terraria.NPC
projType int
attackDelay int
return void

TownNPCAttackProjSpeed() public method

public TownNPCAttackProjSpeed ( Terraria.NPC npc, float &multiplier, float &gravityCorrection, float &randomOffset ) : void
npc Terraria.NPC
multiplier float
gravityCorrection float
randomOffset float
return void

TownNPCAttackShoot() public method

public TownNPCAttackShoot ( Terraria.NPC npc, bool &inBetweenShots ) : void
npc Terraria.NPC
inBetweenShots bool
return void

TownNPCAttackStrength() public method

public TownNPCAttackStrength ( Terraria.NPC npc, int &damage, float &knockback ) : void
npc Terraria.NPC
damage int
knockback float
return void

TownNPCAttackSwing() public method

public TownNPCAttackSwing ( Terraria.NPC npc, int &itemWidth, int &itemHeight ) : void
npc Terraria.NPC
itemWidth int
itemHeight int
return void

UpdateLifeRegen() public method

public UpdateLifeRegen ( Terraria.NPC npc, int &damage ) : void
npc Terraria.NPC
damage int
return void