Jump to content

xiaoyuyu321

Advanced members
  • Content Count

    18
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by xiaoyuyu321


  1. On 4/16/2021 at 2:08 PM, J0k3r said:

    This was never a fix, unless you're not gonna use the "Item Deleveler".
    the issue is, the GameServer never sent the levelRequirement info, so its always set to 0, find & open up CharTrade.cpp then find the following function

    
    CTradeSystem::AddItem

    scroll down till u see this block:- 

    
    SItemGrid* pGridCont = Bag.GetGridContByID( byItemIndex );
    	if( !pGridCont )
      	{
          pMain->SystemNotice( RES_STRING(GM_CHARSTALL_CPP_00057), byItemIndex );
          return FALSE;
      	}
    
        WRITE_SHORT( packet, pGridCont->sEndure[0] );
        WRITE_SHORT( packet, pGridCont->sEndure[1] );
        WRITE_SHORT( packet, pGridCont->sEnergy[0] );
        WRITE_SHORT( packet, pGridCont->sEnergy[1] );
        WRITE_CHAR( packet, pGridCont->chForgeLv );
        WRITE_CHAR( packet, pGridCont->IsValid() ? 1 : 0 );
        WRITE_LONG(packet, pGridCont->GetDBParam(enumITEMDBP_FORGE));
        WRITE_LONG(packet, pGridCont->GetDBParam(enumITEMDBP_INST_ID));

    insert this line
     

    
    WRITE_SHORT(packet, pGridCont->sNeedLv);

    now you're done with the Server part, now let's fix it in the Client as well?
    find & open up PacketCmd_SC.cpp then find the following function

    
    SC_CharTradeInfo

    find the following block

    
    Data.sEndure[0] = packet.ReadShort();
    Data.sEndure[1] = packet.ReadShort();
    Data.sEnergy[0] = packet.ReadShort();
    Data.sEnergy[1] = packet.ReadShort();
    Data.byForgeLv = packet.ReadChar();
    Data.bValid = packet.ReadChar() != 0 ? true : false;
    Data.lDBParam[enumITEMDBP_FORGE] = packet.ReadLong();
    Data.lDBParam[enumITEMDBP_INST_ID] = packet.ReadLong();

    insert this line

    
    Data.levelRequirement = packet.ReadShort();

    open up NetProtocol.h and find this struct 

    
    _NET_CHARTRADE_ITEMDATA

    then add this member variable
     

    
    short levelRequirement; // levelRequirement

    open up NetProtocol.cpp and find the following function
     

    
    NetTradeAddItem

    add this line after Data.bValid

    
    sGrid.sNeedLv = Data.levelRequirement;

    finally, displaying the level requirement correctly? open up UIItemCommand.cpp and replace the line u replaced with these lines

    
    short levelRequirement{ (_ItemData.sNeedLv == 0) ? _pItem->sNeedLv : _ItemData.sNeedLv }; // if the levelRequirement is 0 means it has no data recorded from the server, means the item is on npc and not inside a player's inventory, then display the recorded levelRequirement from ItemInfo.txt
    PUSH_HINT(g_oLangRec.GetString(628), levelRequirement, (pAttr->get(ATTR_LV) >= levelRequirement) ? GENERIC_COLOR : VALID_COLOR);

    done. oh and by the way the stall has the same issue, now you can fix it on your own 
     

    But I modify it according to you, the compilation is still wrong

    “        short levelRequirement
            { 
                (_ItemData.sNeedLv == 0) ? _pItem->sNeedLv : _ItemData.sNeedLv 
            };”

     


  2. 1 hour ago, yagura2k said:
    
    NetCommand.h
    @@ ++ Line 529
    
    #define CMD_MC_REQUESTPIN  CMD_MC_BASE + 113
    
    NetIf.cpp
    @@ ++ Line 143
    
    case CMD_MC_REQUESTPIN: {
    								CCursor::I()->SetCursor(	CCursor::stNormal	);
    								g_stUIDoublePwd.SetType(CDoublePwdMgr::MC_REQUEST);
    								g_stUIDoublePwd.ShowDoublePwdForm();
    								return true;
    							}
    
    Serverfiles/lua/misscript/npc.lua
    
    r_talk13 = nil
    function r_talk13 ()
        Talk( 1, "Monica: Hi, I am Banker Monica. Accounts can never go wrong with me around." )
        InitTrigger()
        TriggerCondition( 1, HasMoney, 200 )
        TriggerAction( 1, TakeMoney, 200 )
        TriggerAction( 1, OpenBank )
        TriggerFailure( 1, JumpPage, 2 )
        Text( 1, "Vault (PIN)", RequestClientPin, enumPinForBank)
    
        Talk( 2, "Sorry, you do not have sufficient gold to pay for vault usage" )
    
        AddNpcMission(1050)
        AddNpcMission(1212)
        AddNpcMission(6091)
        AddNpcMission(6092)
    end

    If there is any issue let me know, maybe I forgot something.

    "CDoublePwdMgr::MC_REQUEST"  MC_REQUEST is not a member of CDoublePwdMgr


  3. Fixed the guild's PDEF attribute.This property cannot be reset when the guild is dissolved, resulting in a build in error.....

    GameServer\src\GameDB.cpp

    search:

    "bool CTableGuild::Disband(CCharacter* pCha,cChar *passwd)"

    The original code:

    MSPD = 0, ASPD = 0,MXATK = 0, DEF = 0, HIT = 0, FLEE = 0, HREC = 0, SREC = 0, MXHP = 0 ,MXSP = 0

    repair:

    PDEF = 0, MSPD = 0, ASPD = 0,MXATK = 0, DEF = 0, HIT = 0, FLEE = 0, HREC = 0, SREC = 0, MXHP = 0 ,MXSP = 0

     

    My English is not very good, I hope I can understand😃

    • Like 2

  4. 16 hours ago, Satan said:

     

     

    转到游戏服务器源目录并打开文件README.md,需要修改数据库(查询)它会修复该错误

    Thank you !!!!

    image.png.75e536ad7afd90e40e6dc60abfb17b6f.png

    Did I make this mistake when I tried to create characters?

    client problem? How can I solve it?

    Can you help me?


  5. On Thu Jun 21 2018 at 4:21 AM, Joah said:

    Added Rear Fairys to Pet Marriage System

    Requirements:

    10x Rear Squid Meat

    10x Skeleton of Sorrow Warrior

    1x Diamond Fruit of Rear

    2x Mordo Junior's Lv20+/Full Stamina

     

     

    On Sun Jun 24 2018 at 5:28 AM, Joah said:

    Added Fruit Effects ->

    When a player uses EXP/Drop Rate/Party Exp Fruits

    An effect will be displayed above the characters head.

    This will -> help others know that their team used a exp/drop rate item so they won't get blamed if they didn't use exp boost or drop boost, this also will help notify players that their "Fruits" have ran out, and needs to be re-used.

     

     

    How does this effect do? Can you share it?

×
×
  • Create New...