mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
chore: Remove new
s in Behavior members (#1504)
* Remove news in behavior members Tested that GrowingFlowers still have their SkillEvent fired with the correct parameters, gftikitorch works, sharks eating stinky fish still work * explicitly default move assignment and copy operators/constructors --------- Co-authored-by: jadebenn <jadebenn@users.noreply.github.com>
This commit is contained in:
@@ -9,17 +9,16 @@ void SkillEventBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bit
|
||||
auto* target = Game::entityManager->GetEntity(branch.target);
|
||||
auto* caster = Game::entityManager->GetEntity(context->originator);
|
||||
|
||||
if (caster != nullptr && target != nullptr && this->m_effectHandle != nullptr && !this->m_effectHandle->empty()) {
|
||||
target->GetScript()->OnSkillEventFired(target, caster, *this->m_effectHandle);
|
||||
if (caster != nullptr && target != nullptr && !this->m_effectHandle.empty()) {
|
||||
target->GetScript()->OnSkillEventFired(target, caster, this->m_effectHandle);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SkillEventBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitStream, BehaviorBranchContext branch) {
|
||||
void SkillEventBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitStream, BehaviorBranchContext branch) {
|
||||
auto* target = Game::entityManager->GetEntity(branch.target);
|
||||
auto* caster = Game::entityManager->GetEntity(context->originator);
|
||||
|
||||
if (caster != nullptr && target != nullptr && this->m_effectHandle != nullptr && !this->m_effectHandle->empty()) {
|
||||
target->GetScript()->OnSkillEventFired(target, caster, *this->m_effectHandle);
|
||||
if (caster != nullptr && target != nullptr && !this->m_effectHandle.empty()) {
|
||||
target->GetScript()->OnSkillEventFired(target, caster, this->m_effectHandle);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user