Added constants for Castle Data manipulation (#3531)
* Fixes #3530. * Added constants for script commands getcastledata and setcastledata. * Adjusted the guardian constants to adjust based on MAX_GUARDIANS define value. * Updated scripts to reflect changes. Thanks to @keitenai, @Atemo, and @Lemongrass3110!
This commit is contained in:
@@ -3375,29 +3375,29 @@ to by its map name. Castle information is stored in `guild_castle` SQL table.
|
||||
|
||||
Types of data correspond to `guild_castle` table columns:
|
||||
|
||||
1 - `guild_id` - Guild ID.
|
||||
2 - `economy` - Castle Economy score.
|
||||
3 - `defense` - Castle Defense score.
|
||||
4 - `triggerE` - Number of times the economy was invested in today.
|
||||
5 - `triggerD` - Number of times the defense was invested in today.
|
||||
6 - `nextTime` - unused
|
||||
7 - `payTime` - unused
|
||||
8 - `createTime` - unused
|
||||
9 - `visibleC` - Is 1 if a Kafra was hired for this castle, 0 otherwise.
|
||||
10 - `visibleG0` - Is 1 if the 1st guardian is present (Soldier Guardian)
|
||||
11 - `visibleG1` - Is 1 if the 2nd guardian is present (Soldier Guardian)
|
||||
12 - `visibleG2` - Is 1 if the 3rd guardian is present (Soldier Guardian)
|
||||
13 - `visibleG3` - Is 1 if the 4th guardian is present (Archer Guardian)
|
||||
14 - `visibleG4` - Is 1 if the 5th guardian is present (Archer Guardian)
|
||||
15 - `visibleG5` - Is 1 if the 6th guardian is present (Knight Guardian)
|
||||
16 - `visibleG6` - Is 1 if the 7th guardian is present (Knight Guardian)
|
||||
17 - `visibleG7` - Is 1 if the 8th guardian is present (Knight Guardian)
|
||||
CD_GUILD_ID - Guild ID.
|
||||
CD_CURRENT_ECONOMY - Castle Economy score.
|
||||
CD_CURRENT_DEFENSE - Castle Defense score.
|
||||
CD_INVESTED_ECONOMY - Number of times the economy was invested in today.
|
||||
CD_INVESTED_DEFENSE - Number of times the defense was invested in today.
|
||||
CD_NEXT_TIME - unused
|
||||
CD_PAY_TIME - unused
|
||||
CD_CREATE_TIME - unused
|
||||
CD_ENABLED_KAFRA - Is 1 if a Kafra was hired for this castle, 0 otherwise.
|
||||
CD_ENABLED_GUARDIAN0 - Is 1 if the 1st guardian is present (Soldier Guardian)
|
||||
CD_ENABLED_GUARDIAN1 - Is 1 if the 2nd guardian is present (Soldier Guardian)
|
||||
CD_ENABLED_GUARDIAN2 - Is 1 if the 3rd guardian is present (Soldier Guardian)
|
||||
CD_ENABLED_GUARDIAN3 - Is 1 if the 4th guardian is present (Archer Guardian)
|
||||
CD_ENABLED_GUARDIAN4 - Is 1 if the 5th guardian is present (Archer Guardian)
|
||||
CD_ENABLED_GUARDIAN5 - Is 1 if the 6th guardian is present (Knight Guardian)
|
||||
CD_ENABLED_GUARDIAN6 - Is 1 if the 7th guardian is present (Knight Guardian)
|
||||
CD_ENABLED_GUARDIAN7 - Is 1 if the 8th guardian is present (Knight Guardian)
|
||||
|
||||
All types of data have their meaning determined by War of Emperium scripts,
|
||||
with exception of:
|
||||
- `guild_id` that is always considered ID of the guild that owns the castle,
|
||||
- `defense` that is used in Guardians & Emperium HP calculations,
|
||||
- `visibleG` that is always considered to hold guardian presence bits.
|
||||
- CD_GUILD_ID that is always considered ID of the guild that owns the castle,
|
||||
- CD_CURRENT_DEFENSE that is used in Guardians & Emperium HP calculations,
|
||||
- CD_ENABLED_GUARDIANX that is always considered to hold guardian presence bits.
|
||||
|
||||
The 'setcastledata' command will behave identically, but instead of returning
|
||||
values for the specified types of accessible data, it will alter them and cause
|
||||
|
||||
Reference in New Issue
Block a user