Jump to content

[Ajuda] Bug gold drop


Luffy
 Share

Recommended Posts

5 horas atrás, Aeglon disse:

Acho que te falta o "gold" no item_proto

 

item_proto.txt

  Ocultar conteúdo


1	µ·²Ù·¯¹Ì	ITEM_ELK	0	1	NONE	NONE	NONE	NONE	0	0	0	0	0	LIMIT_NONE	0	LIMIT_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	0	0	0	0	0	0	0	0	0

 

 

item_name.txt

  Ocultar conteúdo


1	Yang

 

 

 

 

O nome voltou aparecer, era o compactador do item_proto que tá com erro. Mas o valor do gold continua vindo apenas 1, até se colocar dó próprio inventario no chão e pegar de volta o valor permanece sendo 1.

Edited by Luffy
Link to comment
Share on other sites

  • 2 weeks later...
2 horas atrás, Tierri Lopes disse:

Na source do game, procura por uma função chamada:

DropGold

ou GoldDrop

Não sei o nome exacto, depois coloca aqui essa função sff

Achei isso:

Spoiler

bool CHARACTER::DropGold (int gold)
{
    if (gold <= 0 || gold > GetGold())
    {
        return false;
    }

    if (!CanHandleItem())
    {
        return false;
    }

    if (0 != g_GoldDropTimeLimitValue)
    {
        if (get_dword_time() < m_dwLastGoldDropTime + g_GoldDropTimeLimitValue)
        {
            ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("¾ÆÁ÷ °ñµå¸¦ ¹ö¸± ¼ö ¾ø½À´Ï´Ù."));
            return false;
        }
    }

    m_dwLastGoldDropTime = get_dword_time();

    LPITEM item = ITEM_MANAGER::instance().CreateItem (1, gold);

    if (item)
    {
        PIXEL_POSITION pos = GetXYZ();
        if (item->AddToGround (GetMapIndex(), pos))
        {
            PointChange (POINT_GOLD, -gold, true);
            {
                if (gold > 1000)
                {
                    LogManager::instance().CharLog (this, gold, "DROP_GOLD", "");
                }
            }

            item->StartDestroyEvent (60);
            ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("¶³¾îÁø ¾ÆÀÌÅÛÀº %dºÐ ÈÄ »ç¶óÁý´Ï´Ù."), 1);

        }
        Save();
        return true;
    }

    return false;
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...