C# Class Aura.Channel.Scripting.Scripts.GameEventScript

Script for in-game events, like Double Rainbow.
Inheritance: GeneralScript
Afficher le fichier Open project: aura-project/aura

Méthodes publiques

Méthode Description
AddActivationSpan ( ActivationSpan span ) : void

Adds the given activation span to the event, in which it's supposed to be active.

AfterLoad ( ) : void

Called after script was registered, so it can schedule itself.

Dispose ( ) : void
End ( ) : void

Stops event if it's active.

Init ( ) : bool

Loads and sets up event.

IsActiveTime ( System.DateTime time ) : bool

Returns true if the event is supposed to be active at the given time, based on its activation spans.

SetId ( string id ) : void

Sets event's id.

SetName ( string name ) : void

Sets event's name, which is used for notices and broadcasts.

Start ( ) : void

Starts event if it's not active yet.

Méthodes protégées

Méthode Description
AddEventItemToShop ( string shopName, int itemId, int amount = 1, int price = -1, int stock = -1 ) : void

Adds the the item to the given shop.

AddFishingGround ( int priority, double chance, IEnumerable locations, IEnumerable items, int rod, int bait ) : void

Adds fishing ground, to be considered when players fish.

The fishing grounds describe where a player can fish under which circumstances, and what they can catch. If multiple fishing grounds exist for a location, the priority and the chance determine which ground is used. For example, if you want to override the Tir fishing spots during and event, you could do the following, which would add a new ground for the Tir spots, with a high priority and a 100% chance, so it always gets selected over the default.

AddGlobalBonus ( GlobalBonusStat stat, float multiplier ) : void

Adds global bonus.

AddGlobalDrop ( GlobalDropType type, DropData data ) : void

Adds global drop by type.

AddGlobalDrop ( int raceId, DropData data ) : void

Adds global drop by race id.

AddGlobalDrop ( string tag, DropData data ) : void

Adds global drop by race tag.

OnEnd ( ) : void

Called when the event is deactivated.

OnStart ( ) : void

Called when the event is activated.

RemoveEventItemsFromShop ( string shopName ) : void

Removes all event items from the given shop.

RemoveFishingGrounds ( ) : void

Removes all event fishing grounds associated with this event.

RemoveGlobalBonuses ( ) : void

Removes all global bonuses associated with this event.

RemoveGlobalDrops ( ) : void

Removes all global drops associated with this event.

ScheduleEvent ( System.DateTime from, System.DateTime till ) : void

Schedules this event to be active during the given time span.

ScheduleEvent ( System.DateTime from, System.TimeSpan timeSpan ) : void

Schedules this event to be active during the given time span.

Method Details

AddActivationSpan() public méthode

Adds the given activation span to the event, in which it's supposed to be active.
public AddActivationSpan ( ActivationSpan span ) : void
span ActivationSpan
Résultat void

AddEventItemToShop() protected méthode

Adds the the item to the given shop.
protected AddEventItemToShop ( string shopName, int itemId, int amount = 1, int price = -1, int stock = -1 ) : void
shopName string
itemId int
amount int
price int
stock int
Résultat void

AddFishingGround() protected méthode

Adds fishing ground, to be considered when players fish.
The fishing grounds describe where a player can fish under which circumstances, and what they can catch. If multiple fishing grounds exist for a location, the priority and the chance determine which ground is used. For example, if you want to override the Tir fishing spots during and event, you could do the following, which would add a new ground for the Tir spots, with a high priority and a 100% chance, so it always gets selected over the default.
protected AddFishingGround ( int priority, double chance, IEnumerable locations, IEnumerable items, int rod, int bait ) : void
priority int
chance double
locations IEnumerable
items IEnumerable
rod int
bait int
Résultat void

AddGlobalBonus() protected méthode

Adds global bonus.
protected AddGlobalBonus ( GlobalBonusStat stat, float multiplier ) : void
stat GlobalBonusStat
multiplier float
Résultat void

AddGlobalDrop() protected méthode

Adds global drop by type.
protected AddGlobalDrop ( GlobalDropType type, DropData data ) : void
type GlobalDropType
data DropData
Résultat void

AddGlobalDrop() protected méthode

Adds global drop by race id.
protected AddGlobalDrop ( int raceId, DropData data ) : void
raceId int
data DropData
Résultat void

AddGlobalDrop() protected méthode

Adds global drop by race tag.
protected AddGlobalDrop ( string tag, DropData data ) : void
tag string
data DropData
Résultat void

AfterLoad() public méthode

Called after script was registered, so it can schedule itself.
public AfterLoad ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

End() public méthode

Stops event if it's active.
public End ( ) : void
Résultat void

Init() public méthode

Loads and sets up event.
public Init ( ) : bool
Résultat bool

IsActiveTime() public méthode

Returns true if the event is supposed to be active at the given time, based on its activation spans.
public IsActiveTime ( System.DateTime time ) : bool
time System.DateTime
Résultat bool

OnEnd() protected méthode

Called when the event is deactivated.
protected OnEnd ( ) : void
Résultat void

OnStart() protected méthode

Called when the event is activated.
protected OnStart ( ) : void
Résultat void

RemoveEventItemsFromShop() protected méthode

Removes all event items from the given shop.
protected RemoveEventItemsFromShop ( string shopName ) : void
shopName string
Résultat void

RemoveFishingGrounds() protected méthode

Removes all event fishing grounds associated with this event.
protected RemoveFishingGrounds ( ) : void
Résultat void

RemoveGlobalBonuses() protected méthode

Removes all global bonuses associated with this event.
protected RemoveGlobalBonuses ( ) : void
Résultat void

RemoveGlobalDrops() protected méthode

Removes all global drops associated with this event.
protected RemoveGlobalDrops ( ) : void
Résultat void

ScheduleEvent() protected méthode

Schedules this event to be active during the given time span.
protected ScheduleEvent ( System.DateTime from, System.DateTime till ) : void
from System.DateTime
till System.DateTime
Résultat void

ScheduleEvent() protected méthode

Schedules this event to be active during the given time span.
protected ScheduleEvent ( System.DateTime from, System.TimeSpan timeSpan ) : void
from System.DateTime
timeSpan System.TimeSpan
Résultat void

SetId() public méthode

Sets event's id.
public SetId ( string id ) : void
id string
Résultat void

SetName() public méthode

Sets event's name, which is used for notices and broadcasts.
public SetName ( string name ) : void
name string
Résultat void

Start() public méthode

Starts event if it's not active yet.
public Start ( ) : void
Résultat void