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

Script for in-game events, like Double Rainbow.
Inheritance: GeneralScript
显示文件 Open project: aura-project/aura

Public Methods

Method 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.

Protected Methods

Method 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 method

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

AddEventItemToShop() protected method

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
return void

AddFishingGround() protected method

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
return void

AddGlobalBonus() protected method

Adds global bonus.
protected AddGlobalBonus ( GlobalBonusStat stat, float multiplier ) : void
stat GlobalBonusStat
multiplier float
return void

AddGlobalDrop() protected method

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

AddGlobalDrop() protected method

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

AddGlobalDrop() protected method

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

AfterLoad() public method

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

Dispose() public method

public Dispose ( ) : void
return void

End() public method

Stops event if it's active.
public End ( ) : void
return void

Init() public method

Loads and sets up event.
public Init ( ) : bool
return bool

IsActiveTime() public method

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
return bool

OnEnd() protected method

Called when the event is deactivated.
protected OnEnd ( ) : void
return void

OnStart() protected method

Called when the event is activated.
protected OnStart ( ) : void
return void

RemoveEventItemsFromShop() protected method

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

RemoveFishingGrounds() protected method

Removes all event fishing grounds associated with this event.
protected RemoveFishingGrounds ( ) : void
return void

RemoveGlobalBonuses() protected method

Removes all global bonuses associated with this event.
protected RemoveGlobalBonuses ( ) : void
return void

RemoveGlobalDrops() protected method

Removes all global drops associated with this event.
protected RemoveGlobalDrops ( ) : void
return void

ScheduleEvent() protected method

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
return void

ScheduleEvent() protected method

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
return void

SetId() public method

Sets event's id.
public SetId ( string id ) : void
id string
return void

SetName() public method

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

Start() public method

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