Jump to content
Fritt

Community Source Code Development - Server / Client

Recommended Posts

8 hours ago, Maridyri said:

There is also a mistake with the online store, this is a very simple roofing felts, and everyone can fix it or for other reasons why we did not see it here.

The solution is also very simple, you must remove the IGSLog line from the BuyIGSPack function (role, ID).

Hi, whats wrong with it?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

@Fritt @Maridyri @xiaoyuyu321

Thanks for contributing. ( I get so dam annoyed when first thing "developers" do is open a SHOP and start selling codes - E.G. Copy-paste some codes in CO files, rename some variable and put it into their "Sell List" ).

 

If you guys want, I can open a repository because this is going no where without a repo, and these bug list deserves their dedicated tickets.

  • Like 4

kong.png

a2.png

Share this post


Link to post
Share on other sites
5 hours ago, KONG said:

@Fritt @Maridyri @xiaoyuyu321

Thanks for contributing. ( I get so dam annoyed when first thing "developers" do is open a SHOP and start selling codes - E.G. Copy-paste some codes in CO files, rename some variable and put it into their "Sell List" ).

 

If you guys want, I can open a repository because this is going no where without a repo, and these bug list deserves their dedicated tickets.

Hi Kong, it’s true that some devs are doing that, i’ve been offered by a few now.

 

Sure you can open a repo i’d be thankful to transfer there

Share this post


Link to post
Share on other sites
Quote

Bug Title: Bank PIN Value

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
UIDoublePwdForm.cpp

void CDoublePwdMgr::_evtDoublePwdFromMouseEvent(CCompent *pSender, int nMsgType, int x, int y, DWORD dwKey)

	case MC_REQUEST:
				g_stUIDoublePwd.SendGameRequest();
				break;// end
			}
-----------------------------

@@ ++ line 284
	void CDoublePwdMgr::SendGameRequest()
	{
		char szMD5[33] = {0};
		md5string(g_stUIDoublePwd.edtDoublePwd->GetCaption(), szMD5);
		
		CS_SendGameRequest( szMD5 );
		
		g_stUIDoublePwd.CloseAllForm();
	} 
UIDoublePwdForm.h

@@ ++ line 52
static const int MC_REQUEST	= -1;

@@ ++ line 80
void SendGameRequest();

 

Edited by yagura2k
  • Like 1

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

@yagura2k Thanks for sharing it, but must add this to be able to compile:
Open PacketCmd_CS.cpp at the end add:

void CS_SendGameRequest( const char szPassword[])	{
    WPacket pk	=g_NetIF->GetWPacket();
	pk.WriteCmd(CMD_CM_GAME_REQUEST_PIN);
    pk.WriteString(szPassword);
	g_NetIF->SendPacketMessage(pk);
}

 

  • Like 1

Share this post


Link to post
Share on other sites

Current Bugs:

Guild Color - FLOOD, needs a Cooldown
Search Stall - FLOOD, needs a Cooldown
In-Game Shop - crashes client when you view some apparels, for ex: Warrior Frock ID 5381 ( This Apparel crashes client even if you have it on invertory )

Share this post


Link to post
Share on other sites
Bug Title: Movement bug.
Bug Description: when the effect of the skill ends, whenever you try to walk you will receive the message illegal movement and thus always returning to the same place
How to replicate: Movement bug states on stun/freeze if player moving
Status (pending / close / open): OPEN
Author (whoever that fixes it): ???

 

  • Like 1

Being better than others is for those who are weak; what matters is to be true to yourself.         

 

Share this post


Link to post
Share on other sites
El 6/9/2020 a las 6:44 PM, yagura2k dijo:













		
		



 

when compiling these errors arise:

 

Game error LNK2019: unresolved external symbol "void __cdecl CS_SendGameRequest(char const * const)" (?CS_SendGameRequest@@YAXQBD@Z) referenced in function "protected: void __thiscall GUI::CDoublePwdMgr::SendGameRequest(void)" (?SendGameRequest@CDoublePwdMgr@GUI@@IAEXXZ)
 

Game fatal error LNK1120: 1 unresolved externals
 

Share this post


Link to post
Share on other sites
On 7/12/2020 at 3:13 AM, johan said:

when compiling these errors arise:

 

Game error LNK2019: unresolved external symbol "void __cdecl CS_SendGameRequest(char const * const)" (?CS_SendGameRequest@@YAXQBD@Z) referenced in function "protected: void __thiscall GUI::CDoublePwdMgr::SendGameRequest(void)" (?SendGameRequest@CDoublePwdMgr@GUI@@IAEXXZ)
 

Game fatal error LNK1120: 1 unresolved externals
 

Try to find out what's wrong, that's how you learn

Share this post


Link to post
Share on other sites
40 minutes ago, yagura2k said:

Intenta descubrir qué está mal, así es como aprendes

The error has been corrected, I mention it because the other solutions are complete and yours is incomplete.
Solution for future readers: Apply the settings proposed by @yagura2k and @Fritt, and take care to check if the variable
"#define CMD_CM_GAME_REQUEST_PIN CMD_CM_BASE + 101" is found in the document NetCommand.h on line 159.
 

On the other hand, thank you for sharing a bit of your work and allowing new developers to work on this project.

 

Share this post


Link to post
Share on other sites
4 minutes ago, johan said:

The error has been corrected, I mention it because the other solutions are complete and yours is incomplete.
Solution for future readers: Apply the settings proposed by @yagura2k and @Fritt, and take care to check if the variable
"#define CMD_CM_GAME_REQUEST_PIN CMD_CM_BASE + 101" is found in the document NetCommand.h on line 159.
 

On the other hand, thank you for sharing a bit of your work and allowing new developers to work on this project.

 

No worries, looking forward to see more developers

  • Like 1

Share this post


Link to post
Share on other sites

So, does this initiative have a repository to track/contribute to fixing bugs?

I think this is the second thread I'm reading where bug fixes are shared in text blocks, with little discussion about the version of the person experiencing the bug, etc.

I saw someone mention creating a repository but I don't see it posted here?

Hydra

Share this post


Link to post
Share on other sites
On 4/15/2020 at 11:03 PM, Fritt said:

Bug Title: Level Requirement on Trade Window
Bug Description: Missing Level Requirement until you purchase the item
How to replicate: Visit any NPC that Sells Items and Hover your mouse into the item
Status (pending / close / open): CLOSED
Author (whoever that fixes it): Fritt

Client Source - UIItemCommand.cpp
Find:


PUSH_HINT( g_oLangRec.GetString(628), _ItemData.sNeedLv, pAttr->get(ATTR_LV)>=_ItemData.sNeedLv ? GENERIC_COLOR : VALID_COLOR );

and replace with:


		sprintf( buf, g_oLangRec.GetString(628), _pItem->sNeedLv, pAttr->get(ATTR_LV)>=_pItem->sNeedLv ? GENERIC_COLOR : VALID_COLOR );
		PushHint( buf, GENERIC_COLOR );	

 

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 
 


Kind regards, AG.

Share this post


Link to post
Share on other sites
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 
        };”

 

Share this post


Link to post
Share on other sites
35 minutes ago, xiaoyuyu321 said:

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

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

 

whats the error message?


Kind regards, AG.

Share this post


Link to post
Share on other sites
On 4/18/2021 at 3:24 AM, J0k3r said:

whats the error message?

image.png.8baa66fef64a0e6086847db7d81973e8.pngLocal function definition is illegal           It's not a function

Edited by xiaoyuyu321
Local function definition is illegal It's not a function

Share this post


Link to post
Share on other sites
3 hours ago, xiaoyuyu321 said:

image.png.8baa66fef64a0e6086847db7d81973e8.pngLocal function definition is illegal           It's not a function

use copy initialization or direct initialization, direct "list" initialization isn't supported before c++11 i believe

short levelRequirement( (_ItemData.sNeedLv == 0) ? _pItem->sNeedLv : _ItemData.sNeedLv );  // direct initialization

short levelRequirement = (_ItemData.sNeedLv == 0) ? _pItem->sNeedLv : _ItemData.sNeedLv;  // copy initialization

 


Kind regards, AG.

Share this post


Link to post
Share on other sites
В 21.04.2020 в 18:08, JaR сказал:

I got this problem, when i create new Account and login using AutoLogin

Have this problem without AutoLog. Have some info how fix?)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...