[C++] A small fix for read etc_drop_item.txt

  • What's the issue?

    Code
    1. SYSERR: Aug 22 18:36:42.624296 :: ReadEtcDropItemFile: No such an item (name: Èò»ö ´ó±â+) SYSERR: Aug 22 18:36:42.624379 :: Boot: cannot load ETCDropItem: locale/germany/etc_drop_item.txt


    Some people fixed it long time ago by replacing the column name from item_proto (which is korean) with vnum.


    Bitte melden Sie sich an, um diesen Link zu sehen.


    If you want to do it like this and don't want the source change (from below) or you don't have the source code of your game core, you can use a update query and copy the vnum to name just if the vnum from item_proto exists inside of mob_proto.drop_item by a specific mob.

    SQL
    1. UPDATE player.item_proto SET name = vnum
    2. WHERE vnum IN (SELECT drop_item FROM player.mob_proto WHERE drop_item >= 10);
    3. # Affected rows: 83
    4. # Time: 35.919ms

    How can i know where the items are dropped?

    So, the structure of etc_drop_item.txt is based on dropping a item with a probability from a specific mob where that mob have the item vnum attached in column mob_drop -> drop_item.

    SQL
    1. SELECT DISTINCT locale_name, vnum, drop_item FROM player.mob_proto where drop_item >= 10;
    locale_namevnumdrop_item
    Wolf10230028
    Alpha Wolf10330069
    Alpha Blue Wolf10530027
    Grey Wolf10630070

    How-To-Fix

    Default structure:


    item_proto.nameprob
    늑대발톱2.0
    늑대발톱+2.0
    늑대털2.0
    멧돼지의 어금니2.0


    With the fix you can use both of methods:


    item_proto.[name or vnum]prob
    300282.0
    300692.0
    300272.0
    멧돼지의 어금니2.0


    • Srcs/Server/game/src/item_manager_read_tables.cpp


    • Srcs/Server/common/service.h

    .

    Einmal editiert, zuletzt von VegaS ()

  • VegaS

    Hat den Titel des Themas von „Small fix read etc_drop_item.txt“ zu „[C++] A small fix for read etc_drop_item.txt“ geändert.