mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 05:57:45 +00:00
Fix issue #68 (Wrong cast time info sent when multiple players are in a zone)
This commit is contained in:
parent
167f0282a8
commit
93a7df304e
7 changed files with 42 additions and 5 deletions
|
@ -10,7 +10,7 @@ class skillDef_121Def
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
19
scripts/chai/skill/cnj/skillDef_132.chai
Normal file
19
scripts/chai/skill/cnj/skillDef_132.chai
Normal 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();
|
|
@ -1,4 +1,4 @@
|
|||
// Status Name: Wind
|
||||
// Status Name: Aero
|
||||
// Status ID: 143
|
||||
|
||||
class statusDef_143Def
|
||||
|
|
18
scripts/chai/status/statusDef_144.chai
Normal file
18
scripts/chai/status/statusDef_144.chai
Normal 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();
|
|
@ -56,7 +56,7 @@ void Core::Action::ActionCast::onStart()
|
|||
castPacket.data().cast_time = m_castTime;
|
||||
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()->sendStateFlags();
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ void Core::Entity::Actor::die()
|
|||
// if the actor is a player, the update needs to be send to himself too
|
||||
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
|
||||
// although that might be handled by setting the HP to 1 and doing some script magic
|
||||
|
|
|
@ -116,7 +116,7 @@ void Core::StatusEffect::StatusEffectContainer::sendUpdate()
|
|||
slot++;
|
||||
}
|
||||
|
||||
bool sendToSelf = m_pOwner->isPlayer() ? true : false;
|
||||
bool sendToSelf = m_pOwner->isPlayer();
|
||||
m_pOwner->sendToInRangeSet( statusEffectList, sendToSelf );
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue