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:
parent
2f4ca9b589
commit
a4959a6eee
1 changed files with 3 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue