ko4life-net / ko

Open source development of the game Knight Online. This is a reversed engineered old version of the game aiming to replicate the nostalgic experience we all once had <3
https://github.com/ko4life-net/ko
MIT License
55 stars 22 forks source link

Guard tower Aiserver explodes #197

Open UTengine opened 1 year ago

UTengine commented 1 year ago

Description

NPC_POS ActType 104(pNpc->m_byMoveType"4") with cotcnt0 makes AI explode and refuses it to load. Alot of npc's use this type from guard towers to delos npc's that are stationary and not allowed to chase enemy players. I'm not sure but maybe some npc's in war too like keeper or victory gate.

Screenshots

image CreateNpcThread - Path type Error : nid=%d, sid=%d, name=%s, acttype=%d, path=%d

Files

\src\server\AIServer\AIServerDlg.cpp

To Reproduce

Insert Guard tower with acttype 104 to database.

Tasks

Include specific tasks in the order they need to be done in. Include links to specific lines of code where the task should happen at.

Explosion bypasses with current code: if (pNpc->m_byMoveType >= 2 && NpcPosSet.m_DotCnt == 0 && pNpc->m_byMoveType != 4) instead of: if (pNpc->m_byMoveType >= 2 && NpcPosSet.m_DotCnt == 0) {