[L2NPC/L2Server] DBsaving npc bug

Issue #41 resolved
Zconll created an issue

When a npc (boss or event monters) use dbsaving in npcpos.txt, if this npc have privates (create privates) when die if privates left live server don't save time low in db untill than all private is died, if you have server restart or crash, when server start again npc (boss, event monster) will have same hp than one private and then can kill boss again faster. Sample core boss, kill to him and left privates lives, then restart server again and back core. btw after restart core hp regenearation work only when player is near core boss. Verified in original c1 and smeli extender c2. For fix this problem from script we can add check in ai if my booss isn't live then despawn.

Comments (9)

  1. Master Toma repo owner

    Original C1 bug, will see, whether I can do something in CacheD or L2NPC, without server

  2. Master Toma repo owner

    Other related issue:

    When you have boss db empty and load npcs all is correct hp, position.
    But if you close server and again restart, all npc with db saved have low hp and are placed in incorrect position, core is good sample.

  3. Zconll reporter

    Here we can to see bug in previous session hp was full and correct position (first spawn from empty db).

    Shot00012.jpg

  4. Master Toma repo owner

    This part of code is fixed in C4

        if (m_spawnDefine->IsSavingToDB() && GetSharedData()->bossSharedIndex == -1 && !(rand() % 10))
        {
            g_dbNpc.SaveNpcInfo(this);
        }
    

  5. Master Toma repo owner

    btw after restart core hp regenearation work only when player is near core boss.

    Sleep mode should be disabled, to let Core regen HP:

    no_sleep_mode=1
    

    This is done for all Epics. I will add this to c1 branch.

  6. Log in to comment