C# Class Terraria.ModLoader.NPCLoader

Afficher le fichier Open project: bluemagic123/tModLoader Class Usage Examples

Méthodes publiques

Свойство Type Description
blockLoot IList

Private Properties

Свойство Type Description
DrawHealthBar void
GetNPCInfo NPCInfo
IsModNPC bool
NPCLoader System
ReserveNPCID int
ResizeArrays void
SetupNPC void
SetupNPCInfo void
Unload void

Méthodes publiques

Méthode 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

Méthode 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 méthode

public static AI ( NPC npc ) : void
npc NPC
Résultat void

BossBag() public static méthode

public static BossBag ( NPC npc, int &bagType ) : void
npc NPC
bagType int
Résultat void

BossHeadRotation() public static méthode

public static BossHeadRotation ( NPC npc, float &rotation ) : void
npc NPC
rotation float
Résultat void

BossHeadSlot() public static méthode

public static BossHeadSlot ( NPC npc, int &index ) : void
npc NPC
index int
Résultat void

BossHeadSpriteEffects() public static méthode

public static BossHeadSpriteEffects ( NPC npc, SpriteEffects &spriteEffects ) : void
npc NPC
spriteEffects SpriteEffects
Résultat void

BossLoot() public static méthode

public static BossLoot ( NPC npc, string &name, int &potionType ) : void
npc NPC
name string
potionType int
Résultat void

BuffTownNPC() public static méthode

public static BuffTownNPC ( float &damageMult, int &defense ) : void
damageMult float
defense int
Résultat void

CanBeHitByItem() public static méthode

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

CanBeHitByProjectile() public static méthode

public static CanBeHitByProjectile ( NPC npc, Projectile projectile ) : bool?
npc NPC
projectile Projectile
Résultat bool?

CanHitNPC() public static méthode

public static CanHitNPC ( NPC npc, NPC target ) : bool?
npc NPC
target NPC
Résultat bool?

CanHitPlayer() public static méthode

public static CanHitPlayer ( NPC npc, Player target, int &cooldownSlot ) : bool
npc NPC
target Player
cooldownSlot int
Résultat bool

CanTownNPCSpawn() public static méthode

public static CanTownNPCSpawn ( int numTownNPCs, int money ) : void
numTownNPCs int
money int
Résultat void

CheckActive() public static méthode

public static CheckActive ( NPC npc ) : bool
npc NPC
Résultat bool

CheckConditions() public static méthode

public static CheckConditions ( int type ) : bool
type int
Résultat bool

CheckDead() public static méthode

public static CheckDead ( NPC npc ) : bool
npc NPC
Résultat bool

ChooseSpawn() public static méthode

public static ChooseSpawn ( Terraria.ModLoader.NPCSpawnInfo spawnInfo ) : int?
spawnInfo Terraria.ModLoader.NPCSpawnInfo
Résultat int?

DisplayName() public static méthode

public static DisplayName ( int type ) : string
type int
Résultat string

DrawEffects() public static méthode

public static DrawEffects ( NPC npc, Color &drawColor ) : void
npc NPC
drawColor Color
Résultat void

DrawHealthBar() public static méthode

public static DrawHealthBar ( NPC npc, float &scale ) : bool
npc NPC
scale float
Résultat bool

DrawTownAttackGun() public static méthode

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

DrawTownAttackSwing() public static méthode

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
Résultat void

EditSpawnRange() public static méthode

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

EditSpawnRate() public static méthode

public static EditSpawnRate ( Player player, int &spawnRate, int &maxSpawns ) : void
player Player
spawnRate int
maxSpawns int
Résultat void

FindFrame() public static méthode

public static FindFrame ( NPC npc, int frameHeight ) : void
npc NPC
frameHeight int
Résultat void

GetAlpha() public static méthode

public static GetAlpha ( NPC npc, Color lightColor ) : Color?
npc NPC
lightColor Color
Résultat Color?

GetChat() public static méthode

public static GetChat ( NPC npc, string &chat ) : void
npc NPC
chat string
Résultat void

GetNPC() public static méthode

public static GetNPC ( int type ) : ModNPC
type int
Résultat ModNPC

HitEffect() public static méthode

public static HitEffect ( NPC npc, int hitDirection, double damage ) : void
npc NPC
hitDirection int
damage double
Résultat void

ModifyHitByItem() public static méthode

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
Résultat void

ModifyHitByProjectile() public static méthode

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
Résultat void

ModifyHitNPC() public static méthode

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

ModifyHitPlayer() public static méthode

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

NPCAI() public static méthode

public static NPCAI ( NPC npc ) : void
npc NPC
Résultat void

NPCLoot() public static méthode

public static NPCLoot ( NPC npc ) : void
npc NPC
Résultat void

OnChatButtonClicked() public static méthode

public static OnChatButtonClicked ( bool firstButton ) : void
firstButton bool
Résultat void

OnHitByItem() public static méthode

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
Résultat void

OnHitByProjectile() public static méthode

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

OnHitNPC() public static méthode

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

OnHitPlayer() public static méthode

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

PostAI() public static méthode

public static PostAI ( NPC npc ) : void
npc NPC
Résultat void

PostDraw() public static méthode

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

PreAI() public static méthode

public static PreAI ( NPC npc ) : bool
npc NPC
Résultat bool

PreDraw() public static méthode

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

PreNPCLoot() public static méthode

public static PreNPCLoot ( NPC npc ) : bool
npc NPC
Résultat bool

ReceiveExtraAI() public static méthode

public static ReceiveExtraAI ( NPC npc, BinaryReader reader ) : void
npc NPC
reader System.IO.BinaryReader
Résultat void

ResetEffects() public static méthode

public static ResetEffects ( NPC npc ) : void
npc NPC
Résultat void

ScaleExpertStats() public static méthode

public static ScaleExpertStats ( NPC npc, int numPlayers, float bossLifeScale ) : void
npc NPC
numPlayers int
bossLifeScale float
Résultat void

SendExtraAI() public static méthode

public static SendExtraAI ( NPC npc, BinaryWriter writer ) : void
npc NPC
writer System.IO.BinaryWriter
Résultat void

SetChatButtons() public static méthode

public static SetChatButtons ( string &button, string &button2 ) : void
button string
button2 string
Résultat void

SetupShop() public static méthode

public static SetupShop ( int type, Chest shop, int &nextSlot ) : void
type int
shop Chest
nextSlot int
Résultat void

SetupTravelShop() public static méthode

public static SetupTravelShop ( int shop, int &nextSlot ) : void
shop int
nextSlot int
Résultat void

SpawnNPC() public static méthode

public static SpawnNPC ( int type, int tileX, int tileY ) : int
type int
tileX int
tileY int
Résultat int

StrikeNPC() public static méthode

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
Résultat bool

TownNPCAttackCooldown() public static méthode

public static TownNPCAttackCooldown ( NPC npc, int &cooldown, int &randExtraCooldown ) : void
npc NPC
cooldown int
randExtraCooldown int
Résultat void

TownNPCAttackMagic() public static méthode

public static TownNPCAttackMagic ( NPC npc, float &auraLightMultiplier ) : void
npc NPC
auraLightMultiplier float
Résultat void

TownNPCAttackProj() public static méthode

public static TownNPCAttackProj ( NPC npc, int &projType, int &attackDelay ) : void
npc NPC
projType int
attackDelay int
Résultat void

TownNPCAttackProjSpeed() public static méthode

public static TownNPCAttackProjSpeed ( NPC npc, float &multiplier, float &gravityCorrection, float &randomOffset ) : void
npc NPC
multiplier float
gravityCorrection float
randomOffset float
Résultat void

TownNPCAttackShoot() public static méthode

public static TownNPCAttackShoot ( NPC npc, bool &inBetweenShots ) : void
npc NPC
inBetweenShots bool
Résultat void

TownNPCAttackStrength() public static méthode

public static TownNPCAttackStrength ( NPC npc, int &damage, float &knockback ) : void
npc NPC
damage int
knockback float
Résultat void

TownNPCAttackSwing() public static méthode

public static TownNPCAttackSwing ( NPC npc, int &itemWidth, int &itemHeight ) : void
npc NPC
itemWidth int
itemHeight int
Résultat void

TownNPCName() public static méthode

public static TownNPCName ( int type ) : string
type int
Résultat string

UpdateLifeRegen() public static méthode

public static UpdateLifeRegen ( NPC npc, int &damage ) : void
npc NPC
damage int
Résultat void

UsesPartyHat() public static méthode

public static UsesPartyHat ( NPC npc ) : bool
npc NPC
Résultat bool

Property Details

blockLoot public_oe static_oe property

public static IList blockLoot
Résultat IList