Decompile fn_23901 (CSession::PlaySkillGroundEffect)

Batch #10058 by dori: 0 byte-identical, 1 confirmed by peer review.

- fn_23901 CSession::PlaySkillGroundEffect: logic confirmed by peer review

Peer-reviewed-by: cremane, doczeira
Reviewed-by: ragnarok-clanker
This commit is contained in:
ragnarok-clanker 2026-11-02 15:50:35 +00:00
commit 85e6aa68d3

View file

@ -1801,20 +1801,20 @@ bool LaunchLuaSkillEffect(int skillId, int level, CGameActor* source, CGameActor
// FUNCTION: fn_23901
bool CSession::PlaySkillGroundEffect(int skillId, vector3d position) {
bool hasInfo = false;
if (!g_luaScript->Call("HaveSkillEffectInfo", "d>b", skillId, &hasInfo) || !hasInfo) {
if (!g_session.m_hotkeyScript->Call("HaveSkillEffectInfo", "d>b", skillId, &hasInfo) || !hasInfo) {
return false;
}
const char* waveName = nullptr;
if (g_luaScript->Call("GetEffectWaveFileName", "d>s", skillId, &waveName) && std::strcmp(waveName, "") != 0) {
if (g_session.m_hotkeyScript->Call("GetEffectWaveFileName", "d>s", skillId, &waveName) && std::strcmp(waveName, "") != 0) {
g_soundMgr->PlayWave(waveName, 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
}
int count = 0;
if (g_luaScript->Call("GetGroundEffectNum", "d>d", skillId, &count)) {
if (g_session.m_hotkeyScript->Call("GetGroundEffectNum", "d>d", skillId, &count)) {
for (int index = 0; index < count; ++index) {
int effectId = -1;
g_luaScript->Call("GetGroundEffectID", "dd>d", skillId, index + 1, &effectId);
g_session.m_hotkeyScript->Call("GetGroundEffectID", "dd>d", skillId, index + 1, &effectId);
if (effectId == -1) {
continue;
}