C# Class SagaMap.Skills.SkillHandler

Show file Open project: Willyham/SagaRO2 Class Usage Examples

Public Methods

Method Description
AddPassiveSkillEXP ( ActorPC pc, string StatusName, uint skillbaseID, uint exp ) : void

Add EXP to a Passive Skill of a player

AddPassiveStatus ( Actor pc, string StatusName, byte WeaponType, PassiveSkillStatus &Status, PassiveSkillStatus callback, PassiveSkillStatus DeactFunc ) : PassiveStatusAddResult

Add a passive status to a Actor

AddPassiveStatus ( Actor pc, string StatusName, byte WeaponType, Tasks &Status ) : PassiveStatusAddResult

Add a passive status to a Actor

AddPassiveStatus ( Actor pc, string StatusName, byte WeaponType, Tasks &Status, Tasks DeactFunc ) : PassiveStatusAddResult

Add a passive status to a Actor

AddSkillEXP ( ActorPC &pc, uint skillid, uint exp ) : void

Add EXP to a skill of a player

AddStatusIcon ( Actor actor, uint skillid, uint time ) : void

Add a Status Icon to an actor

ApplyAddition ( Actor actor, Addition addition ) : void

Apply a addition to an actor

CalcBattleStatus ( Actor &actor ) : void

Calculte the battlestatus of an actor

CalcCrit ( Actor sActor, Actor dActor, Map args, Skills type ) : Map.SkillArgs.AttackResult

Calculate the Attack result of a attack(miss,normal,critical)

CalcDamage ( Actor &sActor, Actor &dActor, Map args ) : uint

Damage calculation for skills not defined in skill table

CalcHPSP ( ActorPC &pc ) : void
CastPassivSkill ( ActorPC &pc ) : void
CastSkill ( Actor &sActor, Actor &dActor, Map &args ) : void
CheckSkillSP ( ActorPC pc, SkillIDs skillid ) : bool

Check if the player has enough sp to cast skill, and decrease SP by the required amount

EquiptLoseDurabilityOnDeath ( ActorPC pc ) : void
GainLP ( ActorPC pc, SkillIDs skillID ) : void

Increases Players LP by 1 point

GainLP ( ActorPC pc, SkillIDs skillID, byte point ) : void

Increase Players LP

GetPCATK ( ActorPC pc, int &min, int &max ) : void
GetSkillAtkBonus ( SkillIDs id ) : int
GetSkillMAtkBonus ( SkillIDs id ) : int
GetSkillRAtkBonus ( SkillIDs id ) : int
IsCritical ( Actor &sActor, Actor &dActor, Map args ) : Map.SkillArgs.AttackResult
MagicalAttack ( Actor &sActor, Actor &dActor, uint damage, AttackElements element, Map &args ) : uint
PhysicalAttack ( Actor &sActor, Actor &dActor, uint damage, AttackElements element, Map &args ) : uint
RemoveAddition ( Actor actor, Addition addition ) : void
RemoveAddition ( Actor actor, Addition addition, bool removeOnly ) : void
RemoveStatusIcon ( Actor actor, uint skillid ) : void

Remove a status icon of a actor

SendAddSkill ( ActorPC pc, uint skillid, byte slot ) : void

Add a skill to Skill List

SendAllStatusIcons ( ActorPC pc, Actor actor ) : void

Send all status icons of a Actor to player

SendDeleteSkill ( ActorPC pc, uint skillid ) : void

Delete a skill from Skill list

SendDeleteSpecial ( ActorPC pc, uint skillid ) : void

Delete a skill from Special skill list

SetSkillFailed ( Map &arg ) : void

Set the skill argument to "Skill casting failed"

SkillAddSpecial ( ActorPC &sActor, uint skillid ) : SkillAddResault

Learn a skill

SkillResetOnJobChange ( ActorPC pc ) : void

Reset skills of a PC on job change. Move all skills into Inactive Skill table and get all skills in inactive skill table for current job

WeaponLoseDura ( ActorPC pc, ushort amount ) : void

Decrease the Durability of the active weapon of a player

Private Methods

Method Description
CalcAtk ( Actor &actor ) : void
CalcAtkNPC ( ActorNPC &npc ) : void
CalcAtkPC ( ActorPC &pc ) : void
CalcFlee ( Actor &actor ) : void
CalcFleeNPC ( ActorNPC &npc ) : void
CalcFleePC ( ActorPC &pc ) : void
CalcHit ( Actor &actor ) : void
CalcHitNPC ( ActorNPC &npc ) : void
CalcHitPC ( ActorPC &pc ) : void
CalcMAtk ( Actor &actor ) : void
CalcMAtkNPC ( ActorNPC &npc ) : void
CalcMAtkPC ( ActorPC &pc ) : void
CalcRAtkPC ( ActorPC &pc ) : void
CheckSkill ( ActorPC pc, uint baseid, int maxlv ) : bool
EquiptLoseDurability ( ActorPC pc ) : void
GetJobHPBonus ( JobType job ) : short
GetJobSPBonus ( JobType job ) : ushort
LoseDura ( ActorPC pc, SagaDB slot ) : void
LoseDura ( ActorPC pc, SagaDB slot, float percentage ) : void
PCPotionHeal ( ActorPC &targetPC, ushort hp, ushort hp2, ushort sp, ushort sp2, int lifetime, int period, Map args ) : void
SkillAttack ( Actor &sActor, Actor &dActor, uint damage, Map &args ) : void

Method Details

AddPassiveSkillEXP() public static method

Add EXP to a Passive Skill of a player
public static AddPassiveSkillEXP ( ActorPC pc, string StatusName, uint skillbaseID, uint exp ) : void
pc SagaDB.Actors.ActorPC Player
StatusName string Status Name
skillbaseID uint BaseID of a certain skill
exp uint Maximum of exp to add
return void

AddPassiveStatus() public static method

Add a passive status to a Actor
public static AddPassiveStatus ( Actor pc, string StatusName, byte WeaponType, PassiveSkillStatus &Status, PassiveSkillStatus callback, PassiveSkillStatus DeactFunc ) : PassiveStatusAddResult
pc SagaDB.Actors.Actor Actor
StatusName string Name of the Status
WeaponType byte Weapon type
Status PassiveSkillStatus Status instance
callback PassiveSkillStatus Delegate to a callback function
DeactFunc PassiveSkillStatus Delegate to a deactivation function
return PassiveStatusAddResult

AddPassiveStatus() public static method

Add a passive status to a Actor
public static AddPassiveStatus ( Actor pc, string StatusName, byte WeaponType, Tasks &Status ) : PassiveStatusAddResult
pc SagaDB.Actors.Actor Actor
StatusName string Name of the Status
WeaponType byte Weapon type
Status Tasks Status instance
return PassiveStatusAddResult

AddPassiveStatus() public static method

Add a passive status to a Actor
public static AddPassiveStatus ( Actor pc, string StatusName, byte WeaponType, Tasks &Status, Tasks DeactFunc ) : PassiveStatusAddResult
pc SagaDB.Actors.Actor Player
StatusName string Name of the Status
WeaponType byte Weapon type
Status Tasks Status instance
DeactFunc Tasks Delegate to a deactivation function
return PassiveStatusAddResult

AddSkillEXP() public static method

Add EXP to a skill of a player
public static AddSkillEXP ( ActorPC &pc, uint skillid, uint exp ) : void
pc SagaDB.Actors.ActorPC Player
skillid uint Skill ID
exp uint Maximum of exp to add
return void

AddStatusIcon() public static method

Add a Status Icon to an actor
public static AddStatusIcon ( Actor actor, uint skillid, uint time ) : void
actor SagaDB.Actors.Actor
skillid uint
time uint
return void

ApplyAddition() public static method

Apply a addition to an actor
public static ApplyAddition ( Actor actor, Addition addition ) : void
actor SagaDB.Actors.Actor Actor which the addition should be applied to
addition Addition Addition to be applied
return void

CalcBattleStatus() public static method

Calculte the battlestatus of an actor
public static CalcBattleStatus ( Actor &actor ) : void
actor SagaDB.Actors.Actor
return void

CalcCrit() public static method

Calculate the Attack result of a attack(miss,normal,critical)
public static CalcCrit ( Actor sActor, Actor dActor, Map args, Skills type ) : Map.SkillArgs.AttackResult
sActor SagaDB.Actors.Actor Source Actor
dActor SagaDB.Actors.Actor Target Actor
args SagaMap.Map Argument contains skill infomation
type Skills Attack type
return Map.SkillArgs.AttackResult

CalcDamage() public static method

Damage calculation for skills not defined in skill table
public static CalcDamage ( Actor &sActor, Actor &dActor, Map args ) : uint
sActor SagaDB.Actors.Actor
dActor SagaDB.Actors.Actor
args SagaMap.Map
return uint

CalcHPSP() public static method

public static CalcHPSP ( ActorPC &pc ) : void
pc SagaDB.Actors.ActorPC
return void

CastPassivSkill() public static method

public static CastPassivSkill ( ActorPC &pc ) : void
pc SagaDB.Actors.ActorPC
return void

CastSkill() public static method

public static CastSkill ( Actor &sActor, Actor &dActor, Map &args ) : void
sActor SagaDB.Actors.Actor
dActor SagaDB.Actors.Actor
args SagaMap.Map
return void

CheckSkillSP() public static method

Check if the player has enough sp to cast skill, and decrease SP by the required amount
public static CheckSkillSP ( ActorPC pc, SkillIDs skillid ) : bool
pc SagaDB.Actors.ActorPC Player
skillid SkillIDs Skill ID
return bool

EquiptLoseDurabilityOnDeath() public static method

public static EquiptLoseDurabilityOnDeath ( ActorPC pc ) : void
pc SagaDB.Actors.ActorPC
return void

GainLP() public static method

Increases Players LP by 1 point
public static GainLP ( ActorPC pc, SkillIDs skillID ) : void
pc SagaDB.Actors.ActorPC Player
skillID SkillIDs ID of the skill that caused the increasement of LP
return void

GainLP() public static method

Increase Players LP
public static GainLP ( ActorPC pc, SkillIDs skillID, byte point ) : void
pc SagaDB.Actors.ActorPC Player
skillID SkillIDs ID of the skill that caused the increasement of LP
point byte Amount
return void

GetPCATK() public static method

public static GetPCATK ( ActorPC pc, int &min, int &max ) : void
pc SagaDB.Actors.ActorPC
min int
max int
return void

GetSkillAtkBonus() public static method

public static GetSkillAtkBonus ( SkillIDs id ) : int
id SkillIDs
return int

GetSkillMAtkBonus() public static method

public static GetSkillMAtkBonus ( SkillIDs id ) : int
id SkillIDs
return int

GetSkillRAtkBonus() public static method

public static GetSkillRAtkBonus ( SkillIDs id ) : int
id SkillIDs
return int

IsCritical() public static method

public static IsCritical ( Actor &sActor, Actor &dActor, Map args ) : Map.SkillArgs.AttackResult
sActor SagaDB.Actors.Actor
dActor SagaDB.Actors.Actor
args SagaMap.Map
return Map.SkillArgs.AttackResult

MagicalAttack() public static method

public static MagicalAttack ( Actor &sActor, Actor &dActor, uint damage, AttackElements element, Map &args ) : uint
sActor SagaDB.Actors.Actor
dActor SagaDB.Actors.Actor
damage uint
element AttackElements
args SagaMap.Map
return uint

PhysicalAttack() public static method

public static PhysicalAttack ( Actor &sActor, Actor &dActor, uint damage, AttackElements element, Map &args ) : uint
sActor SagaDB.Actors.Actor
dActor SagaDB.Actors.Actor
damage uint
element AttackElements
args SagaMap.Map
return uint

RemoveAddition() public static method

public static RemoveAddition ( Actor actor, Addition addition ) : void
actor SagaDB.Actors.Actor
addition Addition
return void

RemoveAddition() public static method

public static RemoveAddition ( Actor actor, Addition addition, bool removeOnly ) : void
actor SagaDB.Actors.Actor
addition Addition
removeOnly bool
return void

RemoveStatusIcon() public static method

Remove a status icon of a actor
public static RemoveStatusIcon ( Actor actor, uint skillid ) : void
actor SagaDB.Actors.Actor Actor
skillid uint Icon to be removed
return void

SendAddSkill() public static method

Add a skill to Skill List
public static SendAddSkill ( ActorPC pc, uint skillid, byte slot ) : void
pc SagaDB.Actors.ActorPC Player
skillid uint Skill to be added
slot byte Slot
return void

SendAllStatusIcons() public static method

Send all status icons of a Actor to player
public static SendAllStatusIcons ( ActorPC pc, Actor actor ) : void
pc SagaDB.Actors.ActorPC Player
actor SagaDB.Actors.Actor Actor
return void

SendDeleteSkill() public static method

Delete a skill from Skill list
public static SendDeleteSkill ( ActorPC pc, uint skillid ) : void
pc SagaDB.Actors.ActorPC Player
skillid uint Skill to be removed
return void

SendDeleteSpecial() public static method

Delete a skill from Special skill list
public static SendDeleteSpecial ( ActorPC pc, uint skillid ) : void
pc SagaDB.Actors.ActorPC Player
skillid uint Skill to be removed
return void

SetSkillFailed() public static method

Set the skill argument to "Skill casting failed"
public static SetSkillFailed ( Map &arg ) : void
arg SagaMap.Map
return void

SkillAddSpecial() public static method

Learn a skill
public static SkillAddSpecial ( ActorPC &sActor, uint skillid ) : SkillAddResault
sActor SagaDB.Actors.ActorPC Player
skillid uint Skill to be learned
return SkillAddResault

SkillResetOnJobChange() public static method

Reset skills of a PC on job change. Move all skills into Inactive Skill table and get all skills in inactive skill table for current job
public static SkillResetOnJobChange ( ActorPC pc ) : void
pc SagaDB.Actors.ActorPC target PC
return void

WeaponLoseDura() public static method

Decrease the Durability of the active weapon of a player
public static WeaponLoseDura ( ActorPC pc, ushort amount ) : void
pc SagaDB.Actors.ActorPC Player
amount ushort Amount of durability to lose
return void