Skill Tasks changes

Addressed an issue where the Spinjitzu Initiate achievement would not progress.  This also allows mission tasks that specify that the player must get a kill on an enemy with a skill to progress.  Tested mission 1935 and 1139 and both missions progressed and completed as intended.
This commit is contained in:
EmosewaMC
2022-04-25 03:25:07 -07:00
parent 58d2cee984
commit 4117ceb6c1
8 changed files with 26 additions and 30 deletions

View File

@@ -14,7 +14,7 @@ void BasicAttackBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bi
auto* destroyableComponent = entity->GetComponent<DestroyableComponent>();
if (destroyableComponent != nullptr) {
PlayFx(u"onhit", entity->GetObjectID());
destroyableComponent->Damage(this->m_maxDamage, context->originator);
destroyableComponent->Damage(this->m_maxDamage, context->originator, context->skillID);
}
this->m_onSuccess->Handle(context, bitStream, branch);
@@ -56,7 +56,7 @@ void BasicAttackBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bi
auto* destroyableComponent = entity->GetComponent<DestroyableComponent>();
if (destroyableComponent != nullptr) {
PlayFx(u"onhit", entity->GetObjectID());
destroyableComponent->Damage(damageDealt, context->originator);
destroyableComponent->Damage(damageDealt, context->originator, context->skillID);
}
}
}
@@ -113,7 +113,7 @@ void BasicAttackBehavior::Calculate(BehaviorContext* context, RakNet::BitStream*
auto* destroyableComponent = entity->GetComponent<DestroyableComponent>();
if (damage != 0 && destroyableComponent != nullptr) {
PlayFx(u"onhit", entity->GetObjectID(), 1);
destroyableComponent->Damage(damage, context->originator, false);
destroyableComponent->Damage(damage, context->originator, context->skillID, false);
context->ScheduleUpdate(branch.target);
}
}

View File

@@ -58,6 +58,8 @@ struct BehaviorContext
float skillTime = 0;
uint32_t skillID = 0;
uint32_t skillUId = 0;
bool failed = false;