C# Class Terraria.ModLoader.NPCLoader

Mostrar archivo Open project: bluemagic123/tModLoader Class Usage Examples

Public Properties

Property Type Description
blockLoot IList

Private Properties

Property Type Description
DrawHealthBar void
GetNPCInfo NPCInfo
IsModNPC bool
NPCLoader System
ReserveNPCID int
ResizeArrays void
SetupNPC void
SetupNPCInfo void
Unload void

Public Methods

Method Description
AI ( NPC npc ) : void
BossBag ( NPC npc, int &bagType ) : void
BossHeadRotation ( NPC npc, float &rotation ) : void
BossHeadSlot ( NPC npc, int &index ) : void
BossHeadSpriteEffects ( NPC npc, SpriteEffects &spriteEffects ) : void
BossLoot ( NPC npc, string &name, int &potionType ) : void
BuffTownNPC ( float &damageMult, int &defense ) : void
CanBeHitByItem ( NPC npc, Player player, System.Item item ) : bool?
CanBeHitByProjectile ( NPC npc, Projectile projectile ) : bool?
CanHitNPC ( NPC npc, NPC target ) : bool?
CanHitPlayer ( NPC npc, Player target, int &cooldownSlot ) : bool
CanTownNPCSpawn ( int numTownNPCs, int money ) : void
CheckActive ( NPC npc ) : bool
CheckConditions ( int type ) : bool
CheckDead ( NPC npc ) : bool
ChooseSpawn ( Terraria.ModLoader.NPCSpawnInfo spawnInfo ) : int?
DisplayName ( int type ) : string
DrawEffects ( NPC npc, Color &drawColor ) : void
DrawHealthBar ( NPC npc, float &scale ) : bool
DrawTownAttackGun ( NPC npc, float &scale, int &item, int &closeness ) : void
DrawTownAttackSwing ( NPC npc, Microsoft.Xna.Framework.Graphics.Texture2D &item, int &itemSize, float &scale, Vector2 &offset ) : void
EditSpawnRange ( Player player, int &spawnRangeX, int &spawnRangeY, int &safeRangeX, int &safeRangeY ) : void
EditSpawnRate ( Player player, int &spawnRate, int &maxSpawns ) : void
FindFrame ( NPC npc, int frameHeight ) : void
GetAlpha ( NPC npc, Color lightColor ) : Color?
GetChat ( NPC npc, string &chat ) : void
GetNPC ( int type ) : ModNPC
HitEffect ( NPC npc, int hitDirection, double damage ) : void
ModifyHitByItem ( NPC npc, Player player, System.Item item, int &damage, float &knockback, bool &crit ) : void
ModifyHitByProjectile ( NPC npc, Projectile projectile, int &damage, float &knockback, bool &crit, int &hitDirection ) : void
ModifyHitNPC ( NPC npc, NPC target, int &damage, float &knockback, bool &crit ) : void
ModifyHitPlayer ( NPC npc, Player target, int &damage, bool &crit ) : void
NPCAI ( NPC npc ) : void
NPCLoot ( NPC npc ) : void
OnChatButtonClicked ( bool firstButton ) : void
OnHitByItem ( NPC npc, Player player, System.Item item, int damage, float knockback, bool crit ) : void
OnHitByProjectile ( NPC npc, Projectile projectile, int damage, float knockback, bool crit ) : void
OnHitNPC ( NPC npc, NPC target, int damage, float knockback, bool crit ) : void
OnHitPlayer ( NPC npc, Player target, int damage, bool crit ) : void
PostAI ( NPC npc ) : void
PostDraw ( NPC npc, SpriteBatch spriteBatch, Color drawColor ) : void
PreAI ( NPC npc ) : bool
PreDraw ( NPC npc, SpriteBatch spriteBatch, Color drawColor ) : bool
PreNPCLoot ( NPC npc ) : bool
ReceiveExtraAI ( NPC npc, BinaryReader reader ) : void
ResetEffects ( NPC npc ) : void
ScaleExpertStats ( NPC npc, int numPlayers, float bossLifeScale ) : void
SendExtraAI ( NPC npc, BinaryWriter writer ) : void
SetChatButtons ( string &button, string &button2 ) : void
SetupShop ( int type, Chest shop, int &nextSlot ) : void
SetupTravelShop ( int shop, int &nextSlot ) : void
SpawnNPC ( int type, int tileX, int tileY ) : int
StrikeNPC ( NPC npc, double &damage, int defense, float &knockback, int hitDirection, bool &crit ) : bool
TownNPCAttackCooldown ( NPC npc, int &cooldown, int &randExtraCooldown ) : void
TownNPCAttackMagic ( NPC npc, float &auraLightMultiplier ) : void
TownNPCAttackProj ( NPC npc, int &projType, int &attackDelay ) : void
TownNPCAttackProjSpeed ( NPC npc, float &multiplier, float &gravityCorrection, float &randomOffset ) : void
TownNPCAttackShoot ( NPC npc, bool &inBetweenShots ) : void
TownNPCAttackStrength ( NPC npc, int &damage, float &knockback ) : void
TownNPCAttackSwing ( NPC npc, int &itemWidth, int &itemHeight ) : void
TownNPCName ( int type ) : string
UpdateLifeRegen ( NPC npc, int &damage ) : void
UsesPartyHat ( NPC npc ) : bool

Private Methods

Method Description
DrawHealthBar ( NPC npc, Vector2 position, float scale ) : void
GetNPCInfo ( NPC npc, Mod mod, string name ) : NPCInfo
IsModNPC ( NPC npc ) : bool
NPCLoader ( ) : System
ReserveNPCID ( ) : int
ResizeArrays ( bool unloading ) : void
SetupNPC ( NPC npc ) : void
SetupNPCInfo ( NPC npc ) : void
Unload ( ) : void

Method Details

AI() public static method

public static AI ( NPC npc ) : void
npc NPC
return void

BossBag() public static method

public static BossBag ( NPC npc, int &bagType ) : void
npc NPC
bagType int
return void

BossHeadRotation() public static method

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

BossHeadSlot() public static method

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

BossHeadSpriteEffects() public static method

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

BossLoot() public static method

public static BossLoot ( NPC npc, string &name, int &potionType ) : void
npc NPC
name string
potionType int
return void

BuffTownNPC() public static method

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

CanBeHitByItem() public static method

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

CanBeHitByProjectile() public static method

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

CanHitNPC() public static method

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

CanHitPlayer() public static method

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

CanTownNPCSpawn() public static method

public static CanTownNPCSpawn ( int numTownNPCs, int money ) : void
numTownNPCs int
money int
return void

CheckActive() public static method

public static CheckActive ( NPC npc ) : bool
npc NPC
return bool

CheckConditions() public static method

public static CheckConditions ( int type ) : bool
type int
return bool

CheckDead() public static method

public static CheckDead ( NPC npc ) : bool
npc NPC
return bool

ChooseSpawn() public static method

public static ChooseSpawn ( Terraria.ModLoader.NPCSpawnInfo spawnInfo ) : int?
spawnInfo Terraria.ModLoader.NPCSpawnInfo
return int?

DisplayName() public static method

public static DisplayName ( int type ) : string
type int
return string

DrawEffects() public static method

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

DrawHealthBar() public static method

public static DrawHealthBar ( NPC npc, float &scale ) : bool
npc NPC
scale float
return bool

DrawTownAttackGun() public static method

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

DrawTownAttackSwing() public static method

public static DrawTownAttackSwing ( NPC npc, Microsoft.Xna.Framework.Graphics.Texture2D &item, int &itemSize, float &scale, Vector2 &offset ) : void
npc NPC
item Microsoft.Xna.Framework.Graphics.Texture2D
itemSize int
scale float
offset Vector2
return void

EditSpawnRange() public static method

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

EditSpawnRate() public static method

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

FindFrame() public static method

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

GetAlpha() public static method

public static GetAlpha ( NPC npc, Color lightColor ) : Color?
npc NPC
lightColor Color
return Color?

GetChat() public static method

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

GetNPC() public static method

public static GetNPC ( int type ) : ModNPC
type int
return ModNPC

HitEffect() public static method

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

ModifyHitByItem() public static method

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

ModifyHitByProjectile() public static method

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

ModifyHitNPC() public static method

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

ModifyHitPlayer() public static method

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

NPCAI() public static method

public static NPCAI ( NPC npc ) : void
npc NPC
return void

NPCLoot() public static method

public static NPCLoot ( NPC npc ) : void
npc NPC
return void

OnChatButtonClicked() public static method

public static OnChatButtonClicked ( bool firstButton ) : void
firstButton bool
return void

OnHitByItem() public static method

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

OnHitByProjectile() public static method

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

OnHitNPC() public static method

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

OnHitPlayer() public static method

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

PostAI() public static method

public static PostAI ( NPC npc ) : void
npc NPC
return void

PostDraw() public static method

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

PreAI() public static method

public static PreAI ( NPC npc ) : bool
npc NPC
return bool

PreDraw() public static method

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

PreNPCLoot() public static method

public static PreNPCLoot ( NPC npc ) : bool
npc NPC
return bool

ReceiveExtraAI() public static method

public static ReceiveExtraAI ( NPC npc, BinaryReader reader ) : void
npc NPC
reader System.IO.BinaryReader
return void

ResetEffects() public static method

public static ResetEffects ( NPC npc ) : void
npc NPC
return void

ScaleExpertStats() public static method

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

SendExtraAI() public static method

public static SendExtraAI ( NPC npc, BinaryWriter writer ) : void
npc NPC
writer System.IO.BinaryWriter
return void

SetChatButtons() public static method

public static SetChatButtons ( string &button, string &button2 ) : void
button string
button2 string
return void

SetupShop() public static method

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

SetupTravelShop() public static method

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

SpawnNPC() public static method

public static SpawnNPC ( int type, int tileX, int tileY ) : int
type int
tileX int
tileY int
return int

StrikeNPC() public static method

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

TownNPCAttackCooldown() public static method

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

TownNPCAttackMagic() public static method

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

TownNPCAttackProj() public static method

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

TownNPCAttackProjSpeed() public static method

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

TownNPCAttackShoot() public static method

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

TownNPCAttackStrength() public static method

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

TownNPCAttackSwing() public static method

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

TownNPCName() public static method

public static TownNPCName ( int type ) : string
type int
return string

UpdateLifeRegen() public static method

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

UsesPartyHat() public static method

public static UsesPartyHat ( NPC npc ) : bool
npc NPC
return bool

Property Details

blockLoot public_oe static_oe property

public static IList blockLoot
return IList