mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-03 12:10:22 +00:00
no_projectile for Tools that have no projectile; condensing cases in WSA
This commit is contained in:
parent
ed7406f25f
commit
f8836f1cc4
3 changed files with 14 additions and 7 deletions
|
|
@ -4325,17 +4325,14 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
log.trace("ChangeFireState_Start: " + msg)
|
||||
if(shooting.isEmpty) {
|
||||
FindEquipment match {
|
||||
//special case - suppress the decimator's alternate fire mode
|
||||
case Some(tool : Tool)
|
||||
if tool.Projectile == GlobalDefinitions.phoenix_missile_guided_projectile &&
|
||||
(tool.Magazine > 0 || prefire.contains(item_guid)) =>
|
||||
prefire = None
|
||||
shooting = Some(item_guid)
|
||||
case Some(tool : Tool) =>
|
||||
if(tool.Magazine > 0 || prefire.contains(item_guid)) {
|
||||
prefire = None
|
||||
shooting = Some(item_guid)
|
||||
avatarService ! AvatarServiceMessage(continent.Id, AvatarAction.ChangeFireState_Start(player.GUID, item_guid))
|
||||
//special case - suppress the decimator's alternate fire mode, by projectile
|
||||
if(tool.Projectile != GlobalDefinitions.phoenix_missile_guided_projectile) {
|
||||
avatarService ! AvatarServiceMessage(continent.Id, AvatarAction.ChangeFireState_Start(player.GUID, item_guid))
|
||||
}
|
||||
}
|
||||
else {
|
||||
log.warn(s"ChangeFireState_Start: ${tool.Definition.Name} magazine is empty before trying to shoot bullet")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue