Added new status flag RequireNoWeapon (#7201)

* Fixes #7200.
* Added new status flag RequireNoWeapon.
This commit is contained in:
Singe Horizontal 2023-04-24 18:01:24 +02:00 committed by GitHub
parent b4be3b059a
commit 4718d5e813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 2 deletions

View File

@ -1949,8 +1949,8 @@ Body:
Flags:
NoSave: true
NoClearance: true
RequireWeapon: true
RemoveOnHermode: true
RequireNoWeapon: true
- Status: Spirit
Icon: EFST_SOULLINK
DurationLookup: SL_HIGH

View File

@ -2057,8 +2057,8 @@ Body:
Flags:
NoSave: true
NoClearance: true
RequireWeapon: true
RemoveOnHermode: true
RequireNoWeapon: true
- Status: Spirit
Icon: EFST_SOULLINK
DurationLookup: SL_HIGH

View File

@ -248,6 +248,7 @@ Flags: Various status flags for specific status change events.
NonPlayer - Sends the NPC_SHOWEFST_UPDATE packet. Used to send effects to NPC/monsters.
RequireWeapon - Status requires a weapon to be equipped.
RequireNoWeapon - Status requires that no weapons be equipped.
RequireShield - Status requires a shield to be equipped.
SuperNoviceAngel - Status that is given from Super Novice Angel.

View File

@ -7296,6 +7296,10 @@ static void pc_checkallowskill(map_session_data *sd)
if (sd->sc.getSCE(status) && !pc_check_weapontype(sd, skill_get_weapontype(it.second->skill_id)))
status_change_end(&sd->bl, status);
}
if (flag[SCF_REQUIRENOWEAPON]) {
if (sd->sc.getSCE(status) && sd->status.weapon)
status_change_end(&sd->bl, status, INVALID_TIMER);
}
if (flag[SCF_REQUIRESHIELD]) { // Skills requiring a shield
if (sd->sc.getSCE(status) && sd->status.shield <= 0)

View File

@ -10094,6 +10094,7 @@
export_constant(SCF_REMOVEONUNEQUIPWEAPON);
export_constant(SCF_REMOVEONUNEQUIPARMOR);
export_constant(SCF_REMOVEONHERMODE);
export_constant(SCF_REQUIRENOWEAPON);
/* enchantgrades */
export_constant(ENCHANTGRADE_NONE);

View File

@ -3031,6 +3031,7 @@ enum e_status_change_flag : uint16 {
SCF_REMOVEONUNEQUIPWEAPON,
SCF_REMOVEONUNEQUIPARMOR,
SCF_REMOVEONHERMODE,
SCF_REQUIRENOWEAPON,
SCF_MAX
};