[Bug Fix] Fix #cast defaulting to cast time (#3617)

# Notes
- Defaulted to using cast time instead of instant.
This commit is contained in:
Alex King 2023-10-13 21:12:34 -04:00 committed by GitHub
parent 9884c442e9
commit 565baec675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 9 deletions

View File

@ -250,9 +250,7 @@ enum {
commandMovecharSelfOnly = 80, //below this == only self move allowed
commandMovecharToSpecials = 200, //ability to send people to cshom/load zones
commandCastSpecials = 100, //can cast special spells
commandInstacast = 100, //insta-cast all #casted spells
commandDoAnimOthers = 100, //can #doanim on others
commandLockZones = 101, //can lock or unlock zones
commandEditPlayerCorpses = 150, //can Edit Player Corpses
commandInterrogateInv = 100, //below this == only log on error state and self-only target dump
commandInvSnapshot = 150 //ability to clear/restore snapshots

View File

@ -31,13 +31,8 @@ void command_castspell(Client *c, const Seperator *sep)
return;
}
const bool can_instant_cast = c->Admin() >= commandInstacast;
bool instant_cast = false;
if (can_instant_cast && sep->IsNumber(2)) {
instant_cast = Strings::ToBool(sep->arg[2]);
}
const uint16 target_id = t->GetID();
const bool instant_cast = sep->IsNumber(2) ? Strings::ToBool(sep->arg[2]) : true;
const uint16 target_id = t->GetID();
if (instant_cast) {
c->SpellFinished(spell_id, t);