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

Fix issue #68 (Wrong cast time info sent when multiple players are in a zone)

This commit is contained in:
Maru 2017-08-29 20:28:51 -03:00
parent 167f0282a8
commit 93a7df304e
7 changed files with 42 additions and 5 deletions

View file

@ -10,7 +10,7 @@ class skillDef_121Def
def onFinish( player, target ) def onFinish( player, target )
{ {
player.handleScriptSkill( STD_DAMAGE, 121, 5, 0, target ); player.handleScriptSkill( STD_DAMAGE, 121, 50, 0, target );
target.addStatusEffectByIdIfNotExist(143, 20000, 0); target.addStatusEffectByIdIfNotExist(143, 20000, 0);
} }

View file

@ -0,0 +1,19 @@
// Skill Name: Aero II
// Skill ID: 132
class skillDef_132Def
{
def skillDef_132Def()
{
}
def onFinish( player, target )
{
player.handleScriptSkill( STD_DAMAGE, 132, 50, 0, target );
target.addStatusEffectByIdIfNotExist( 143, 20000, 0 );
}
};
GLOBAL skillDef_132 = skillDef_132Def();

View file

@ -1,4 +1,4 @@
// Status Name: Wind // Status Name: Aero
// Status ID: 143 // Status ID: 143
class statusDef_143Def class statusDef_143Def

View file

@ -0,0 +1,18 @@
// Status Name: Aero II
// Status ID: 144
class statusDef_144Def
{
def statusDef_144Def()
{
}
def onTick( actor, effect )
{
effect.registerTickEffect( 1, 50 );
}
};
GLOBAL statusDef_144 = statusDef_144Def();

View file

@ -56,7 +56,7 @@ void Core::Action::ActionCast::onStart()
castPacket.data().cast_time = m_castTime; castPacket.data().cast_time = m_castTime;
castPacket.data().target_id = m_pTarget->getId(); castPacket.data().target_id = m_pTarget->getId();
m_pSource->sendToInRangeSet( castPacket, true ); m_pSource->sendToInRangeSet( castPacket, false );
m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting );
m_pSource->getAsPlayer()->sendStateFlags(); m_pSource->getAsPlayer()->sendStateFlags();

View file

@ -216,7 +216,7 @@ void Core::Entity::Actor::die()
// if the actor is a player, the update needs to be send to himself too // if the actor is a player, the update needs to be send to himself too
bool selfNeedsUpdate = isPlayer(); bool selfNeedsUpdate = isPlayer();
sendToInRangeSet( ActorControlPacket142( m_id, SetStatus, static_cast< uint8_t>( ActorStatus::Dead ) ), selfNeedsUpdate ); sendToInRangeSet( ActorControlPacket142( m_id, SetStatus, static_cast< uint8_t >( ActorStatus::Dead ) ), selfNeedsUpdate );
// TODO: not all actor show the death animation when they die, some quest npcs might just despawn // TODO: not all actor show the death animation when they die, some quest npcs might just despawn
// although that might be handled by setting the HP to 1 and doing some script magic // although that might be handled by setting the HP to 1 and doing some script magic

View file

@ -116,7 +116,7 @@ void Core::StatusEffect::StatusEffectContainer::sendUpdate()
slot++; slot++;
} }
bool sendToSelf = m_pOwner->isPlayer() ? true : false; bool sendToSelf = m_pOwner->isPlayer();
m_pOwner->sendToInRangeSet( statusEffectList, sendToSelf ); m_pOwner->sendToInRangeSet( statusEffectList, sendToSelf );
} }