Maintenance: [forced, user-approved] Family W4: remove invented EffectAttachments (reference bundle over EffectActorState effects/fir

Batch #10257 by ragnarok-clanker: forced by an admin (7 lower score(s), 31 changed function(s)); checked with 95 compiled unit(s), including every includer of Source/Contents/Effects/EffectActor.h, Source/Contents/Effects/EffectAttachments.h.
Deletes: Source/Contents/Effects/EffectAttachments.h
This commit is contained in:
ragnarok-clanker 2026-11-03 13:09:24 +00:00
commit 3be8819db2
22 changed files with 118 additions and 177 deletions

View file

@ -3219,7 +3219,7 @@ void CGameMode::PlayItemUseEffect(int itemId, std::uint32_t aid) {
}
if (effectId > 0) {
while (static_cast<EffectActor*>(actor)->state.Attachments().HasId(effectId)) {
while (static_cast<EffectActor*>(actor)->HasId(effectId)) {
actor->SendMsg(nullptr, 109, 0, effectId, effectId >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
if (g_effectMgr->HasAllocator(effectId)) {
@ -3230,7 +3230,7 @@ void CGameMode::PlayItemUseEffect(int itemId, std::uint32_t aid) {
}
if (secondEffectId > 0) {
while (static_cast<EffectActor*>(actor)->state.Attachments().HasId(secondEffectId)) {
while (static_cast<EffectActor*>(actor)->HasId(secondEffectId)) {
actor->SendMsg(nullptr, 109, 0, secondEffectId, secondEffectId >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
if (g_effectMgr->HasAllocator(secondEffectId)) {
@ -3777,7 +3777,7 @@ void CGameMode::ProcessMouseWheel(int requireControl) {
g_cameraDistance = static_cast<float>(this->viewParameters[0]);
}
maxDistance = static_cast<float>(this->viewParameters[1] + this->viewParameters[0]);
} else if (zoomSkill.level <= 0 && this->scene->player->render.unknown_0070 == 6 && !this->scene->player->state.Attachments().HasId(0x14E)) {
} else if (zoomSkill.level <= 0 && this->scene->player->render.unknown_0070 == 6 && !this->scene->player->HasId(0x14E)) {
switch (g_session.m_job) {
case 0xFCF:
case 0x1082:

View file

@ -878,7 +878,7 @@ void CGameMode::ReceiveEffectRemove(const unsigned char* data) {
CRenderObject* actor = this->scene->GetGameActorByAidIncludeMe(packet->aid);
if (actor) {
while (static_cast<EffectActor*>(actor)->state.Attachments().HasId(packet->effectId)) {
while (static_cast<EffectActor*>(actor)->HasId(packet->effectId)) {
actor->SendMsg(nullptr, 109, 0, packet->effectId, packet->effectId >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
@ -1145,7 +1145,7 @@ void CGameMode::ReceiveActorEffect228(const unsigned char* data) {
if (packet->state == 0) {
actor->SendMsg(nullptr, 109, 0, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
} else if (packet->state != 1 || static_cast<EffectActor*>(actor)->state.Attachments().HasId(228)) {
} else if (packet->state != 1 || static_cast<EffectActor*>(actor)->HasId(228)) {
return;
}
@ -1501,35 +1501,35 @@ void CGameMode::ReceiveItemEffectResult(const unsigned char* data) {
text = static_cast<const std::string&>(FormatOwnedString(LookupMessage(430), item.DisplayName(0).c_str()));
break;
case 2:
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->state.Attachments().HasId(305)) {
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->HasId(305)) {
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->SendMsg(nullptr, 109, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->LaunchEffect(305, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
text = FormatOwnedString(LookupMessage(431), item.DisplayName(0).c_str()).c_str();
break;
case 3:
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->state.Attachments().HasId(306)) {
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->HasId(306)) {
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->SendMsg(nullptr, 109, 0, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->LaunchEffect(306, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
text = FormatOwnedString(LookupMessage(430), item.DisplayName(0).c_str()).c_str();
break;
case 4:
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->state.Attachments().HasId(1015)) {
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->HasId(1015)) {
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->SendMsg(nullptr, 109, 0, 1015, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->LaunchEffect(1015, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
text = FormatOwnedString(LookupMessage(431), item.DisplayName(0).c_str()).c_str();
break;
case 5:
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->state.Attachments().HasId(1016)) {
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->HasId(1016)) {
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->SendMsg(nullptr, 109, 0, 1016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->LaunchEffect(1016, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
text = FormatOwnedString(LookupMessage(430), item.DisplayName(0).c_str()).c_str();
break;
case 6: {
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->state.Attachments().HasId(1017)) {
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->HasId(1017)) {
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->SendMsg(nullptr, 109, 0, 1017, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->LaunchEffect(1017, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -1541,7 +1541,7 @@ void CGameMode::ReceiveItemEffectResult(const unsigned char* data) {
break;
}
case 7: {
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->state.Attachments().HasId(1018)) {
if (static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->HasId(1018)) {
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->SendMsg(nullptr, 109, 0, 1018, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->player->LaunchEffect(1018, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -6741,7 +6741,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) {
case 358:
if (packet->aid == g_session.m_aid) {
CPlayer* player = this->scene->player;
while (player->state.Attachments().HasId(752)) {
while (player->HasId(752)) {
player->SendMsg(nullptr, 109, 0, 752, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
@ -6804,7 +6804,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) {
case 730:
if (packet->aid == g_session.m_aid) {
CPlayer* player = this->scene->player;
while (player->state.Attachments().HasId(1040)) {
while (player->HasId(1040)) {
player->SendMsg(nullptr, 109, 0, 1040, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
@ -6812,7 +6812,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) {
case 755:
if (packet->aid == g_session.m_aid) {
CPlayer* player = this->scene->player;
while (player->state.Attachments().HasId(1061)) {
while (player->HasId(1061)) {
player->SendMsg(nullptr, 109, 0, 1061, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}

View file

@ -2235,68 +2235,68 @@ void CGameMode::sub_D591A0(std::uint32_t aid, int state, int flag, int options)
}
if (options & 0x1) {
if (!actor->state.Attachments().HasId(166)) {
if (!actor->HasId(166)) {
CRagEffect* effect = actor->LaunchEffect(166, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
if (effect) {
effect->SendMsg(nullptr, 44, 0, 0xFFFF, 130, 0, 0, 0);
}
}
} else if (options & 0x2) {
if (!actor->state.Attachments().HasId(166)) {
if (!actor->HasId(166)) {
CRagEffect* effect = actor->LaunchEffect(166, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
if (effect) {
effect->SendMsg(nullptr, 44, 0, 0xFFFF, 128, 0, 0, 0);
}
}
} else if (options & 0x4) {
if (!actor->state.Attachments().HasId(166)) {
if (!actor->HasId(166)) {
CRagEffect* effect = actor->LaunchEffect(166, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
if (effect) {
effect->SendMsg(nullptr, 44, 0, 0xFFFF, 169, 0, 0, 0);
}
}
} else if (options & 0x4000) {
if (!actor->state.Attachments().HasId(617)) {
if (!actor->HasId(617)) {
actor->LaunchEffect(617, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
}
if ((options & 0x8) && !actor->state.Attachments().HasId(203)) {
if ((options & 0x8) && !actor->HasId(203)) {
actor->LaunchEffect(203, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x10) && !actor->state.Attachments().HasId(254)) {
if ((options & 0x10) && !actor->HasId(254)) {
actor->LaunchEffect(254, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
actor->LaunchEffect(1132, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x1000) && !actor->state.Attachments().HasId(418)) {
if ((options & 0x1000) && !actor->HasId(418)) {
actor->LaunchEffect(418, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
actor->LaunchEffect(544, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x2000) && !actor->state.Attachments().HasId(419)) {
if ((options & 0x2000) && !actor->HasId(419)) {
actor->LaunchEffect(419, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x8000) && !actor->state.Attachments().HasId(424)) {
if ((options & 0x8000) && !actor->HasId(424)) {
actor->LaunchEffect(424, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x20000) && !actor->state.Attachments().HasId(586)) {
if ((options & 0x20000) && !actor->HasId(586)) {
actor->LaunchEffect(586, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x10000) && !actor->state.Attachments().HasId(655)) {
if ((options & 0x10000) && !actor->HasId(655)) {
actor->LaunchEffect(655, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x40) && !actor->state.Attachments().HasId(474)) {
if ((options & 0x40) && !actor->HasId(474)) {
actor->LaunchEffect(474, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x100) && !actor->state.Attachments().HasId(382)) {
if ((options & 0x100) && !actor->HasId(382)) {
actor->LaunchEffect(382, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x80) && !actor->state.Attachments().HasId(368)) {
if ((options & 0x80) && !actor->HasId(368)) {
actor->LaunchEffect(368, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x200) && !actor->state.Attachments().HasId(394)) {
if ((options & 0x200) && !actor->HasId(394)) {
actor->LaunchEffect(394, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x400) && !actor->state.Attachments().HasId(396)) {
if ((options & 0x400) && !actor->HasId(396)) {
actor->LaunchEffect(396, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
@ -2319,10 +2319,10 @@ void CGameMode::sub_D591A0(std::uint32_t aid, int state, int flag, int options)
actor->SetColor(-1, 64, 64, 64);
}
if ((options & 0x800) && !actor->state.Attachments().HasId(375)) {
if ((options & 0x800) && !actor->HasId(375)) {
actor->LaunchEffect(375, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
if ((options & 0x40000) && !actor->state.Attachments().HasId(744)) {
if ((options & 0x40000) && !actor->HasId(744)) {
actor->LaunchEffect(744, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
return;
@ -2343,75 +2343,75 @@ void CGameMode::sub_D591A0(std::uint32_t aid, int state, int flag, int options)
}
if (options & 0x2) {
if (!actor->state.Attachments().HasId(420)) {
if (!actor->HasId(420)) {
actor->LaunchEffect(420, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
} else {
while (actor->state.Attachments().HasId(420)) {
while (actor->HasId(420)) {
actor->SendMsg(nullptr, 109, 0, 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
actor->LaunchEffect(540, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
}
if (options & 0x4) {
if (!actor->state.Attachments().HasId(427)) {
if (!actor->HasId(427)) {
actor->LaunchEffect(427, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
} else {
while (actor->state.Attachments().HasId(427)) {
while (actor->HasId(427)) {
actor->SendMsg(nullptr, 109, 0, 427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
if (options & 0x10) {
if (!actor->state.Attachments().HasId(254)) {
if (!actor->HasId(254)) {
actor->LaunchEffect(254, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
actor->LaunchEffect(1132, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
} else {
while (actor->state.Attachments().HasId(254)) {
while (actor->HasId(254)) {
actor->SendMsg(nullptr, 109, 0, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
actor->SendMsg(nullptr, 109, 0, 1132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
if (options & 0x10000) {
if (!actor->state.Attachments().HasId(655)) {
if (!actor->HasId(655)) {
actor->LaunchEffect(655, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
} else {
while (actor->state.Attachments().HasId(655)) {
while (actor->HasId(655)) {
actor->SendMsg(nullptr, 109, 0, 655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
actor->LaunchEffect(656, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
}
if (options & 0x8000) {
if (!actor->state.Attachments().HasId(667)) {
if (!actor->HasId(667)) {
actor->LaunchEffect(667, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
} else {
while (actor->state.Attachments().HasId(667)) {
while (actor->HasId(667)) {
actor->SendMsg(nullptr, 109, 0, 667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
if (options & 0x800) {
if (!actor->state.Attachments().HasId(375)) {
if (!actor->HasId(375)) {
actor->LaunchEffect(375, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
} else {
while (actor->state.Attachments().HasId(375)) {
while (actor->HasId(375)) {
actor->SendMsg(nullptr, 109, 0, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
if (options & 0x40000) {
if (!actor->state.Attachments().HasId(744)) {
if (!actor->HasId(744)) {
actor->LaunchEffect(744, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
} else {
while (actor->state.Attachments().HasId(744)) {
while (actor->HasId(744)) {
actor->SendMsg(nullptr, 109, 0, 744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
@ -3826,20 +3826,20 @@ void CGameMode::Zc_Spirits2(const unsigned char* data) {
CRagEffect* effect;
if (actor->GetEffectiveJob(-1) == 4038) {
if (actor->state.Attachments().HasId(504) || packet->accountId == 0) {
if (actor->HasId(504) || packet->accountId == 0) {
return;
}
effect = actor->LaunchEffect(504, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
} else if (actor->GetEffectiveJob(-1) == 24 || actor->GetEffectiveJob(-1) == 4215 || actor->GetEffectiveJob(-1) == 4228 ||
actor->GetEffectiveJob(-1) == 4229 || actor->GetEffectiveJob(-1) == 4306) {
if (actor->state.Attachments().HasId(629) || packet->accountId == 0) {
if (actor->HasId(629) || packet->accountId == 0) {
return;
}
effect = actor->LaunchEffect(629, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
} else {
if (actor->state.Attachments().HasId(228) || packet->accountId == 0) {
if (actor->HasId(228) || packet->accountId == 0) {
return;
}
@ -6259,7 +6259,7 @@ void CGameMode::ApplyStatusChange(
case 358:
if (aid == g_session.m_aid) {
CPlayer* player = this->scene->player;
while (player->state.Attachments().HasId(752)) {
while (player->HasId(752)) {
player->SendMsg(nullptr, 109, 0, 752, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
std::sprintf(message, "");
@ -17506,7 +17506,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t
}
break;
case 0x18B:
if (source != nullptr && !source->state.Attachments().HasId(0x18A)) {
if (source != nullptr && !source->HasId(0x18A)) {
source->LaunchEffect(0x18A, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
g_soundMgr->PlayWave("effect\\달빛.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
@ -17539,9 +17539,9 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t
break;
case 0x19B:
if (source != nullptr) {
if (source->state.Attachments().HasId(0x1BB)) {
if (source->HasId(0x1BB)) {
source->LaunchEffect(0x1BC, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
} else if (!source->state.Attachments().HasId(0x1BA)) {
} else if (!source->HasId(0x1BA)) {
source->LaunchEffect(0x1BA, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
}
@ -17557,12 +17557,12 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t
case 0x1A9:
if (source != nullptr) {
g_soundMgr->PlayWave("effect\\T_바람방출.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
while (source->state.Attachments().HasId(0x1CD)) {
while (source->HasId(0x1CD)) {
source->SendMsg(nullptr, 0x6D, 0, 0x1CD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
source->LaunchEffect(0x1CD, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
const int effectId = effectLevel + 0x1D2;
while (source->state.Attachments().HasId(effectId)) {
while (source->HasId(effectId)) {
source->SendMsg(nullptr, 0x6D, 0, effectId, effectId >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
source->LaunchEffect(effectId, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -17570,11 +17570,11 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t
break;
case 0x1AA:
if (source != nullptr) {
if (source->state.Attachments().HasId(0x1BE)) {
if (source->HasId(0x1BE)) {
source->SendMsg(nullptr, 0x6D, 0, 0x1BE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
source->LaunchEffect(0x1BE, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
while (source->state.Attachments().HasId(0x1BD)) {
while (source->HasId(0x1BD)) {
source->SendMsg(nullptr, 0x6D, 0, 0x1BD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
@ -18327,7 +18327,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t
case 0x806:
if (target != nullptr) {
g_soundMgr->PlayWave("effect\\AB_duplelight.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
if (!target->state.Attachments().HasId(0x341)) {
if (!target->HasId(0x341)) {
CRagEffect* effect = target->LaunchEffect(0x341, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
vector3d scale{2.0f, 0.0f, 0.0f};
if (effect) {
@ -18897,7 +18897,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t
case 0xA04:
if (source != nullptr) {
source->LaunchEffect(0x1BE, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
while (source->state.Attachments().HasId(0x430)) {
while (source->HasId(0x430)) {
source->SendMsg(nullptr, 0x6D, 0, 0x430, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
@ -18922,7 +18922,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t
if (source != nullptr) {
source->LaunchEffect(0x1BE, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
g_effectMgr->Spawn(source->render.accountId, 0x4B3, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0);
while (source->state.Attachments().HasId(0x1BD)) {
while (source->HasId(0x1BD)) {
source->SendMsg(nullptr, 0x6D, 0, 0x1BD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
@ -19025,7 +19025,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t
}
break;
case 0x1392:
if (source != nullptr && !source->state.Attachments().HasId(0x439)) {
if (source != nullptr && !source->HasId(0x439)) {
vector3d position = source->render.position;
if (CRagEffect* effect = source->LaunchEffect(0x439, vector3d{0.0f, 0.0f, 0.0f}, 0.0f)) {
const std::int64_t value = reinterpret_cast<std::intptr_t>(&position);
@ -19108,7 +19108,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t
case 0x139F:
if (source != nullptr) {
source->LaunchEffect(0x1BE, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
while (source->state.Attachments().HasId(0x1BD)) {
while (source->HasId(0x1BD)) {
source->SendMsg(nullptr, 0x6D, 0, 0x1BD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
source->LaunchEffect(0x19B, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);

View file

@ -1844,7 +1844,7 @@ void CSession::RemovePartyMemberByName(const char* name) {
}
CRenderObject* actor = mode->scene->GetGameActorByAidIncludeMe(it->accountId);
if (actor != nullptr && static_cast<EffectActor*>(actor)->state.Attachments().HasId(160)) {
if (actor != nullptr && static_cast<EffectActor*>(actor)->HasId(160)) {
actor->SendMsg(nullptr, 109, 0, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
@ -3243,7 +3243,7 @@ void CSession::ClearItemContainers() {
if (mode != nullptr) {
for (std::list<MessengerMember>::iterator it = this->m_partyMembers.begin(); it != this->m_partyMembers.end(); ++it) {
CRenderObject* actor = mode->scene->GetGameActorByAidIncludeMe(it->accountId);
if (actor != nullptr && static_cast<EffectActor*>(actor)->state.Attachments().HasId(160)) {
if (actor != nullptr && static_cast<EffectActor*>(actor)->HasId(160)) {
actor->SendMsg(nullptr, 109, 0, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}

View file

@ -1422,7 +1422,7 @@ void CPc::Slot26(int value) {
3, g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, this->unknown_0454).c_str()
);
if (this->state.Attachments().HasId(678)) {
if (this->HasId(678)) {
this->SendMsg(nullptr, 109, 0, 678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 679, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
@ -3219,12 +3219,12 @@ void CPlayer::ReapplySkillEffects() {
effectId = 5;
}
effectId += 0x1DA;
if (!this->state.Attachments().HasId(effectId)) {
if (!this->HasId(effectId)) {
this->LaunchEffect(0x1E7, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
g_soundMgr->PlayWave("effect\\_blind.wav", 0.0f, -100.0f, 0.0f, 250, 40, 1.0f, 0);
}
for (int id = 0x1DB; id < 0x1E5; ++id) {
if (this->state.Attachments().HasId(id) == true) {
if (this->HasId(id) == true) {
this->SendMsg(nullptr, 109, 0, id, id >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
@ -3256,7 +3256,7 @@ void CPlayer::ReapplySkillEffects() {
this->LaunchEffect(0x24A, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x15E: {
while (this->state.Attachments().HasId(0x341)) {
while (this->HasId(0x341)) {
this->SendMsg(nullptr, 109, 0, 0x341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
CRagEffect* effect = this->LaunchEffect(0x341, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -3273,7 +3273,7 @@ void CPlayer::ReapplySkillEffects() {
this->LaunchEffect(0x170, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x1BD: {
while (this->state.Attachments().HasId(0x39D)) {
while (this->HasId(0x39D)) {
this->SendMsg(nullptr, 109, 0, 0x39D, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
CRagEffect* effect = this->LaunchEffect(0x39D, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -3367,19 +3367,19 @@ void CPlayer::ReapplySkillEffects() {
}
break;
case 0x1C4:
if (this->state.Attachments().HasId(0x57) == true) {
if (this->HasId(0x57) == true) {
this->SendMsg(nullptr, 109, 0, 0x57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x57, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x1C5:
if (this->state.Attachments().HasId(0x31F) == true) {
if (this->HasId(0x31F) == true) {
this->SendMsg(nullptr, 109, 0, 0x31F, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x31F, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x1C0:
if (this->state.Attachments().HasId(0x360) == true) {
if (this->HasId(0x360) == true) {
this->SendMsg(nullptr, 109, 0, 0x360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x360, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -3396,37 +3396,37 @@ void CPlayer::ReapplySkillEffects() {
this->SendMsg(nullptr, 110, 0, type, type >> 31, 1, 0, g_session.unknown_5C1C, g_session.unknown_5C1C >> 31, 0, 0, 0, 0, 0, 0);
break;
case 0x2CD:
while (this->state.Attachments().HasId(0x418)) {
while (this->HasId(0x418)) {
this->SendMsg(this, 109, 0, 0x418, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x418, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x2DF:
while (this->state.Attachments().HasId(0x194)) {
while (this->HasId(0x194)) {
this->SendMsg(this, 109, 0, 0x194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x194, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x2E1:
while (this->state.Attachments().HasId(0x41E)) {
while (this->HasId(0x41E)) {
this->SendMsg(this, 109, 0, 0x41E, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x41E, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x2E0:
while (this->state.Attachments().HasId(0x41F)) {
while (this->HasId(0x41F)) {
this->SendMsg(this, 109, 0, 0x41F, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x41F, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x2CC:
while (this->state.Attachments().HasId(0x421)) {
while (this->HasId(0x421)) {
this->SendMsg(this, 109, 0, 0x421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x421, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x291:
while (this->state.Attachments().HasId(0x3EB)) {
while (this->HasId(0x3EB)) {
this->SendMsg(this, 109, 0, 0x3EB, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x3EB, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -3439,13 +3439,13 @@ void CPlayer::ReapplySkillEffects() {
static_cast<CEnergyOrbEffect*>(orb)->SetCount(10);
}
}
while (this->state.Attachments().HasId(0x3C3)) {
while (this->HasId(0x3C3)) {
this->SendMsg(nullptr, 109, 0, 0x3C3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x3C3, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x290:
while (this->state.Attachments().HasId(0x3EC)) {
while (this->HasId(0x3EC)) {
this->SendMsg(nullptr, 109, 0, 0x3EC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x3EC, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -3463,7 +3463,7 @@ void CPlayer::ReapplySkillEffects() {
}
break;
case 0x2DA:
while (this->state.Attachments().HasId(0x410)) {
while (this->HasId(0x410)) {
this->SendMsg(nullptr, 109, 0, 0x410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x410, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -3472,7 +3472,7 @@ void CPlayer::ReapplySkillEffects() {
break;
case 0x14E:
case 0x365: {
while (this->state.Attachments().HasId(0x318)) {
while (this->HasId(0x318)) {
this->SendMsg(nullptr, 109, 0, 0x318, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
CRagEffect* effect = this->LaunchEffect(0x318, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -3590,7 +3590,7 @@ void CPlayer::ReapplySkillEffects() {
}
break;
case 0x4B5:
if (this->state.Attachments().HasId(0x14E) == true) {
if (this->HasId(0x14E) == true) {
this->SendMsg(nullptr, 109, 0, 0x14E, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
this->LaunchEffect(0x14E, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
@ -3692,7 +3692,7 @@ void CPlayer::ReapplySkillEffects() {
}
break;
case 0x48D:
if (!this->state.Attachments().HasId(0x64A)) {
if (!this->HasId(0x64A)) {
this->LaunchEffect(0x64A, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
break;
@ -3710,12 +3710,12 @@ void CPlayer::ReapplySkillEffects() {
}
break;
case 0x526:
if (!this->state.Attachments().HasId(0x8E5)) {
if (!this->HasId(0x8E5)) {
this->LaunchEffect(0x8E5, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
break;
case 0x527:
if (!this->state.Attachments().HasId(0x8E6)) {
if (!this->HasId(0x8E6)) {
this->LaunchEffect(0x8E6, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
break;

View file

@ -5132,7 +5132,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef
this->SendMsg(nullptr, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
break;
case 8:
while (this->state.Attachments().HasId(802)) {
while (this->HasId(802)) {
this->SendMsg(nullptr, 109, 0, 802, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
break;
@ -5186,7 +5186,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef
this->SendMsg(nullptr, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
break;
case 8:
if (!this->state.Attachments().HasId(802)) {
if (!this->HasId(802)) {
this->LaunchEffect(802, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
break;
@ -5209,7 +5209,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef
if (this->render.accountId == g_session.m_aid) {
g_playerPoisoned = 1;
}
if (!this->state.Attachments().HasId(812)) {
if (!this->HasId(812)) {
this->render.unknown_00A3 = 1;
color[1] = 0x80;
color[2] = 0xFF;
@ -5229,7 +5229,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef
g_soundMgr->PlayWave(
"_poison.wav", this->render.position.x - player.x, 0.0f, this->render.position.z - player.z, 250, 40, 1.0f, 0
);
if (this->render.accountId == g_session.m_aid && !mode->scene->player->state.Attachments().HasId(335)) {
if (this->render.accountId == g_session.m_aid && !mode->scene->player->HasId(335)) {
this->LaunchEffect(335, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
}
@ -5281,7 +5281,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef
g_soundMgr->PlayWave(
"_blind.wav", this->render.position.x - player.x, 0.0f, this->render.position.z - player.z, 250, 40, 1.0f, 0
);
if (this->render.accountId == g_session.m_aid && !mode->scene->player->state.Attachments().HasId(334)) {
if (this->render.accountId == g_session.m_aid && !mode->scene->player->HasId(334)) {
this->LaunchEffect(334, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
}
@ -5840,7 +5840,7 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i
case 2328:
this->SetSequenceInterval(6);
this->SetFrameSequence(0x60, 1, 2, 0x60, 2, 1, g_session.FindUnknown0778(this->render.accountId), 0);
if (!this->state.Attachments().HasId(0x378)) {
if (!this->HasId(0x378)) {
static_cast<CMode*>(g_modeMgr.GetGameMode())->SendMsg(122, 0, 0, 0, 0);
g_soundMgr->PlayWave("effect\\SR_EARTHSHAKER.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
this->LaunchEffect(0x376, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);

View file

@ -543,7 +543,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int
case 0x94:
this->render.unknown_00A4Bytes[1] = 1;
this->sub_E55320(this->GetTrapModelName());
if (this->render.enabled && !this->state.Attachments().HasId(0x91)) {
if (this->render.enabled && !this->HasId(0x91)) {
this->LaunchEffect(0x91, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
return;
@ -636,7 +636,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int
this->m_effectId = 0x6B;
this->render.unknown_00A4Bytes[1] = 0;
this->sub_E55320(this->GetTrapModelName());
if (!this->state.Attachments().HasId(0x91)) {
if (!this->HasId(0x91)) {
this->LaunchEffect(0x91, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
return;
@ -940,7 +940,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int
this->render.enabled = 1;
this->sub_E55320(this->GetTrapModelName());
if (this->GetEffectiveJob(-1) == 0x94 && !this->state.Attachments().HasId(0x91)) {
if (this->GetEffectiveJob(-1) == 0x94 && !this->HasId(0x91)) {
this->LaunchEffect(0x91, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}

View file

@ -99,7 +99,7 @@ int CChampionMonsterMgr::ApplyEffects(int id, CGameActor* actor, int aid) {
if (g_effectMgr->Find(aid, effects[i]) == nullptr) {
const vector3d& position = actor->render.position;
if (g_effectMgr->Spawn(aid, effects[i], position.x, position.y, position.z, 0, -1, 0, 0) == nullptr &&
!actor->state.Attachments().HasId(effects[i])) {
!actor->HasId(effects[i])) {
actor->LaunchEffect(effects[i], actor->render.position, 0.0f);
}
}

View file

@ -1476,7 +1476,7 @@ void CSession::ClearPartyMembers() {
if (mode) {
for (auto member = this->m_partyMembers.begin(); member != this->m_partyMembers.end(); ++member) {
CRenderObject* actor = mode->scene->GetGameActorByAidIncludeMe(member->accountId);
if (actor && static_cast<EffectActor*>(actor)->state.Attachments().HasId(160) == true) {
if (actor && static_cast<EffectActor*>(actor)->HasId(160) == true) {
actor->SendMsg(nullptr, 109, 0, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}

View file

@ -9,11 +9,6 @@ EffectActorState::EffectActorState() : unknown_0138(-1), unknown_013C(0), unknow
EffectActorState::~EffectActorState() {
}
// INLINED
EffectAttachments EffectActorState::Attachments() {
return {this->effects, this->first, this->second};
}
// OFFSET: 0x00CA82E0
// FUNCTION: fn_20987
EffectActor::EffectActor() {

View file

@ -1,18 +1,18 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_EFFECTS_EFFECTACTOR_H
#define RAGNAROK_SOURCE_CONTENTS_EFFECTS_EFFECTACTOR_H
#include "Contents/Effects/EffectAttachments.h"
#include "Contents/Actors/RenderObject.h"
#include "Utility/Math/Vector3d.h"
#include <cstddef>
#include <list>
struct CRagEffect;
struct RagEffectState;
struct EffectActorState {
EffectActorState();
~EffectActorState();
EffectAttachments Attachments();
/* 0138 */ int unknown_0138;
/* 013C */ std::uint32_t unknown_013C;
@ -26,6 +26,8 @@ struct EffectActor : CRenderObject {
EffectActor();
void SendMsg(CGameObject* sender, int message, int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l, int m) override;
bool EffectVisible() const;
bool HasId(int id) const;
bool Contains(const RagEffectState* effect) const;
void ResetEffectState();
CRagEffect* LaunchEffect(int effectId, vector3d deltaPos, float rotation);
CRagEffect* LaunchEffect(int effectId, int duration);

View file

@ -1,11 +1,10 @@
#include "Contents/Effects/EffectAttachments.h"
#include "Contents/Effects/EffectActor.h"
#include "Contents/Effects/RagEffectState.h"
// OFFSET: 0x00CADBE0
// FUNCTION: fn_21062
bool EffectAttachments::HasId(int id) const {
for (const RagEffectState* effect : this->effects) {
bool EffectActor::HasId(int id) const {
for (const RagEffectState* effect : this->state.effects) {
if (effect && effect->type == id) {
return true;
}
@ -16,8 +15,8 @@ bool EffectAttachments::HasId(int id) const {
// OFFSET: 0x00CADC40
// FUNCTION: fn_21064
bool EffectAttachments::Contains(const RagEffectState* effect) const {
for (const RagEffectState* current : this->effects) {
bool EffectActor::Contains(const RagEffectState* effect) const {
for (const RagEffectState* current : this->state.effects) {
if (current == effect) {
return true;
}
@ -26,40 +25,6 @@ bool EffectAttachments::Contains(const RagEffectState* effect) const {
return false;
}
// INLINED
void EffectAttachments::Unlink(RagEffectState* effect) {
if (!effect) {
return;
}
for (auto entry = this->effects.begin(); entry != this->effects.end(); ++entry) {
if (*entry == effect) {
this->effects.erase(entry);
if (this->first == effect) {
this->first = nullptr;
} else if (this->second == effect) {
this->second = nullptr;
}
return;
}
}
}
// INLINED
void EffectAttachments::DetachAll() {
for (RagEffectState* effect : this->effects) {
if (effect) {
effect->parent = nullptr;
}
}
this->effects.clear();
this->first = nullptr;
this->second = nullptr;
}
// OFFSET: 0x00CADC20
// FUNCTION: fn_21063
bool EffectActor::EffectVisible() const {

View file

@ -1,19 +0,0 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_EFFECTS_EFFECTATTACHMENTS_H
#define RAGNAROK_SOURCE_CONTENTS_EFFECTS_EFFECTATTACHMENTS_H
#include <list>
struct RagEffectState;
struct EffectAttachments {
std::list<RagEffectState*>& effects;
RagEffectState*& first;
RagEffectState*& second;
bool HasId(int id) const;
bool Contains(const RagEffectState* effect) const;
void Unlink(RagEffectState* effect);
void DetachAll();
};
#endif

View file

@ -186,7 +186,7 @@ bool PartyMemberEffects::Enabled() const {
// INLINED
void PartyMemberEffects::EnsurePartyEffect(std::uint32_t accountId) {
EffectActor* actor = static_cast<EffectActor*>(this->mode->scene->GetGameActorByAID(accountId));
if (actor && !actor->state.Attachments().HasId(160)) {
if (actor && !actor->HasId(160)) {
actor->LaunchEffect(160, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
}

View file

@ -5,7 +5,6 @@
#include "Contents/Actors/RenderObject.h"
#include "Contents/Camera/Camera.h"
#include "Contents/Effects/EffectActor.h"
#include "Contents/Effects/EffectAttachments.h"
#include "Contents/Effects/EffectMemoryMgr.h"
#include "Contents/Effects/Particle.h"
#include "Contents/World/World.h"
@ -28,7 +27,7 @@ void CShadowExceed::Close() {
CRenderObject* actor = FindRenderObject(this->actor);
if (actor) {
while (static_cast<EffectActor*>(actor)->state.Attachments().HasId(1004) == true) {
while (static_cast<EffectActor*>(actor)->HasId(1004) == true) {
actor->SendMsg(nullptr, 109, 0, 1004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
@ -119,7 +118,7 @@ void CShadowExceed::Slot03() {
this->unknown_00D8 = 1;
CRenderObject* actor = FindRenderObject(this->actor);
if (actor) {
while (static_cast<EffectActor*>(actor)->state.Attachments().HasId(1004) == true) {
while (static_cast<EffectActor*>(actor)->HasId(1004) == true) {
actor->SendMsg(nullptr, 109, 0, 1004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
static_cast<EffectActor*>(actor)->LaunchEffect(1004, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);

View file

@ -5,7 +5,6 @@
#include "Contents/Actors/RenderObject.h"
#include "Contents/Camera/Camera.h"
#include "Contents/Effects/EffectActor.h"
#include "Contents/Effects/EffectAttachments.h"
#include "Contents/Effects/EffectMemoryMgr.h"
#include "Contents/Effects/Particle.h"
#include "Contents/World/World.h"
@ -85,7 +84,7 @@ bool CShadowExceedNew::Slot06() {
if (this->frontEmitters.size() != 0 && this->backEmitters.size() != 0) {
return true;
}
if (!static_cast<EffectActor*>(actor)->state.Attachments().HasId(1004)) {
if (!static_cast<EffectActor*>(actor)->HasId(1004)) {
static_cast<EffectActor*>(actor)->LaunchEffect(1004, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
}

View file

@ -2931,7 +2931,7 @@ void CSession::PlaySkillEffect(int skillId, int level, CGameActor* source, CGame
g_soundMgr->PlayWave("effect\\LG_RAGEBURST.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
break;
case 0x910:
if (!source->state.Attachments().HasId(0x37A)) {
if (!source->HasId(0x37A)) {
source->LaunchEffect(0x376, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
source->LaunchEffect(0x37A, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
g_soundMgr->PlayWave("effect\\LG_MOONSLASHER.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
@ -2959,7 +2959,7 @@ void CSession::PlaySkillEffect(int skillId, int level, CGameActor* source, CGame
g_soundMgr->PlayWave("effect\\SR_DRAGONCOMBO.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
break;
case 0x917:
if (!source->state.Attachments().HasId(0x37A)) {
if (!source->HasId(0x37A)) {
source->LaunchEffect(0x376, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
source->LaunchEffect(0x37A, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
g_soundMgr->PlayWave("effect\\SR_SKYNETBLOW.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
@ -3248,7 +3248,7 @@ void CSession::PlaySkillEffect(int skillId, int level, CGameActor* source, CGame
break;
case 0x20F3:
target->LaunchEffect(0x1D2, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
if (!target->state.Attachments().HasId(0x1CC)) {
if (!target->HasId(0x1CC)) {
target->LaunchEffect(0x1CC, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
break;

View file

@ -223,7 +223,7 @@ void CWeatherEffect::Process() {
}
}
if (this->effect && !static_cast<EffectActor*>(this->actor)->state.Attachments().Contains(reinterpret_cast<const RagEffectState*>(this->effect))) {
if (this->effect && !static_cast<EffectActor*>(this->actor)->Contains(reinterpret_cast<const RagEffectState*>(this->effect))) {
this->effect = nullptr;
}

View file

@ -965,7 +965,7 @@ void CEfstAction_CHOP_CHOP::Slot01(int efstId, int argument2, int argument3, int
// OFFSET: 0x005B6A70
// FUNCTION: fn_03403
void CWhirlwindEffect::Init(EffectActor* parent, int id, vector3d deltaPos) {
if (parent && !parent->state.Attachments().HasId(0x98C)) {
if (parent && !parent->HasId(0x98C)) {
parent->render.instant.Set(25, static_cast<std::int64_t>(parent->render.angle * 1000.0f));
}

View file

@ -223,7 +223,7 @@ void CEfstAction_GRADUAL_GRAVITY::Slot00(int efstId, int value, int argument3, i
// FUNCTION: fn_08673
void CEfstAction_GRADUAL_GRAVITY::Slot01(int efstId, int argument2, int argument3, int argument4, CRenderObject* actor) {
if (actor) {
while (static_cast<EffectActor*>(actor)->state.Attachments().HasId(779)) {
while (static_cast<EffectActor*>(actor)->HasId(779)) {
actor->SendMsg(nullptr, 109, 0, 779, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}

View file

@ -526,7 +526,7 @@ void CEfstAction_SHADOW_CLOCK::Slot00(int efstId, int value, int argument3, int
// FUNCTION: fn_08742
void CEfstAction_SHADOW_CLOCK::Slot01(int efstId, int argument2, int argument3, int argument4, CRenderObject* actor) {
if (actor) {
while (static_cast<EffectActor*>(actor)->state.Attachments().HasId(963)) {
while (static_cast<EffectActor*>(actor)->HasId(963)) {
actor->SendMsg(nullptr, 109, 0, 963, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}

View file

@ -896,7 +896,7 @@ void CEfstAction_SHADOW_EXCEED::Slot01(int efstId, int argument2, int argument3,
}
auto* effectActor = static_cast<EffectActor*>(actor);
while (effectActor->state.Attachments().HasId(1004)) {
while (effectActor->HasId(1004)) {
actor->SendMsg(nullptr, 109, 0, 1004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
@ -1444,7 +1444,7 @@ void CEfstAction_SHADOW_EXCEED::Slot00(int efstId, int value, int argument3, int
}
auto* effectActor = static_cast<EffectActor*>(actor);
if (!effectActor->state.Attachments().HasId(1004)) {
if (!effectActor->HasId(1004)) {
effectActor->LaunchEffect(1004, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
}