目录

spell_area 表


<-返回:World 数据库

This table is used to apply a specific spell aura to the player within an area in the game. When any player enters this area or somehow interacts with a quest, this aura will be handled accordingly.

表结构

FieldTypeAttributesKeyNullDefaultExtraComment
spellMEDIUMINTUNSIGNEDPRINO
areaMEDIUMINTUNSIGNEDPRINO
quest_startMEDIUMINTUNSIGNEDPRINO
quest_endMEDIUMINTUNSIGNED NO
aura_spellMEDIUMINTSIGNEDPRINO
racemaskMEDIUMINTUNSIGNEDPRINO
genderTINYINTUNSIGNEDPRINO
flagsTINYINTUNSIGNED NO
quest_start_statusINTUNSIGNED NO
quest_end_statusINTUNSIGNED NO

字段说明


spell

The spell ID of the spell to be casted on the player. See Spell.dbc.

area

The area ID. Type “.gps” in-game and find the “Area:” number to use for this cell. Also see AreaTable.dbc.

quest_start

The entry of the quest which the player must have in the state defined by quest_start_status. See quest_template.id.

quest_end

The entry of the quest which the player must not have in the state defined by quest_end_status. See quest_template.id. Setting both quest_start and quest_end to the same value is useless.

aura_spell

If set, this value (plus or minus aura spell ID from Spell.dbc) imposes additional condition.

The value has the following effect:

racemask

This ID is automatically called from ChrRaces.dbc. The bitmask is entered here.

gender

The gender type this entry applies to. 0 = Male, 1 = Female, 2 = Any.

flags

Flag Value Name Comment 1 0x01 SPELL_AREA_FLAG_AUTOCAST If the spell should be automatically applied when the character enters the area. Also prevents the user from removing it. 2 0x02 SPELL_AREA_FLAG_AUTOREMOVE If the spell should be automatically removed when the character is inside the area (only works with quest updates) Note: Spell is allways removed on leaving area, SPELL_AREA_FLAG_AUTOREMOVE does not effect this.

Example:

quest_start_status, quest_end_status

Within quest_start_status, you can define the mask of quest status required for quest_start.

Within quest_end_status, you can define the mask of quest status required for quest_end.

Example:

Area 257 is a cavern on Teldrassil. What we want is simple : When the player take the 28725 quest, he have the aura in the cavern. When he finish the 28727 quest, the aura disappear.

You should have the spell 92237 when entering the cavern IF :

Here is the SQL for this example :

INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES 
(92237, 257, 28725, 28727, 1, 74, 11);
Quest StatusFlagExplanation
QUEST_STATUS_NONE = 01Player does not have or had quest at all. He could accept it, but he did not (yet).
QUEST_STATUS_COMPLETE = 12Player fulfilled objectives, but did not hand it in yet.
QUEST_STATUS_UNAVAILABLE = 24 (NOT USED)(Not used)
QUEST_STATUS_INCOMPLETE = 38Player did not fulfill objectives yet
QUEST_STATUS_AVAILABLE = 416 (NOT USED)(Not used)
QUEST_STATUS_FAILED = 532Player failed to fulfill objectives for any reason, e.g. time limit
QUEST_STATUS_REWARDED = 664Player handed quest in and this is sort of a post-quest interaction

Example for a SQL

For a `quest_end_status` that should contain QUEST_STATUS_NONE (1), QUEST_STATUS_COMPLETE (2) and QUEST_STATUS_INCOMPLETE (8):

-- equivalent to `quest_end_status`= 11
UPDATE `spell_area` SET `quest_end_status`= (1|2|8) WHERE `spell`=XXXXX AND `area`=YYYY;

Some examples: