1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 22:57:45 +00:00

minor teleport action script cleanup

This commit is contained in:
NotAdam 2019-03-07 22:24:42 +11:00
parent e1ddf27d56
commit 4577ff6a20

View file

@ -23,21 +23,17 @@ public:
auto teleportQuery = player->getTeleportQuery();
if( player->getCurrency( Common::CurrencyType::Gil ) < teleportQuery.cost )
if( player->getCurrency( Common::CurrencyType::Gil ) < teleportQuery.cost ||
teleportQuery.targetAetheryte == 0 )
{
action.interrupt();
return;
}
if( teleportQuery.targetAetheryte == 0 )
{
action.interrupt();
}
player->removeCurrency( Common::CurrencyType::Gil, teleportQuery.cost );
player->setZoningType( Common::ZoneingType::Teleport );
player->teleport( static_cast< uint16_t >( teleportQuery.targetAetheryte ) );
player->teleport( teleportQuery.targetAetheryte );
player->clearTeleportQuery();
}