Jump to content

Aerrow

Member
  • Posts

    168
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    0%

Posts posted by Aerrow

  1. Thanks for sharing us!

    But I think this way is much better and cleaner:

    if (!pResource || !pResource->IsType(CGraphicImage::Type()))

     

    Hmm, with this way it just simply crash, but if I make that small if separate from the pointer check it works. Can someone explain me this?

    As I know, when the program enter an if statement which contains an or gate, then check the first one and if it's true then skip the other ones. May I know wrong?

  2. As I see there are much ;; in the source, for ex

    TPacketLoginOnSetup * pck = (TPacketLoginOnSetup *) c_pData;;

     Btw we still don't get any error or warning while compiling. But why? If it's a mistake the compiler why not show or get error? Or if its not a mistake why we should fix this?

  3. This is a very bad compare. You can see a lot of things what ripped/extracted from the offical client. Probably some user find or know that what I searching and I hope someone could share with me. And I don't need the exact solution, I could write the code, but I need "how they calculate the scale from the x y z columns", because I'm not a reverse engineer or something.

    And you "gave" me nothing, I don't know what are you talking about. You said nothing concrete what I can use.

  4. Hi community!

    As you know, the original item_scale looks like this:

    #ID	JOB		SEX	X	Y	Z	SCALE_X	SCALE_Y	SCALE_Z
    85001	JOB_WOLFMAN	M	100	100	100	0	0	0
    85001	JOB_ASSASSIN	M	62	68	62	0	0	0.52
    85001	JOB_ASSASSIN	F	62	62	62	0	0	0.45
    85001	JOB_SHAMAN	M	75	75	75	0	0	0.3
    85001	JOB_SHAMAN	F	65	65	65	0	0	0.43
    85001	JOB_SURA	M	73	77	73	0	0	0.4
    85001	JOB_SURA	F	65	70	65	0	0	0.4
    85001	JOB_WARRIOR	M	78	83	78	0	0	0.3
    85001	JOB_WARRIOR	F	70	70	70	0	0	0.4

    But the GF changed to like this:

    #ID	JOB		SEX	X	Y	Z
    85001	JOB_WOLFMAN	M	100	100	100
    85001	JOB_ASSASSIN	M	62	68	62
    85001	JOB_ASSASSIN	F	62	62	62
    85001	JOB_SHAMAN	M	75	75	75
    85001	JOB_SHAMAN	F	65	65	65
    85001	JOB_SURA	M	73	77	73
    85001	JOB_SURA	F	65	70	65
    85001	JOB_WARRIOR	M	78	83	78
    85001	JOB_WARRIOR	F	70	70	70

    As you can see they just removed the last 3 columns.

    My question is, someone knows how to change the binary source to could handle this? Because I don't know, how they calculate the scale from the x y z columns.

    Thanks in advance!

    • Love 1
  5. I hate when some people delete their bug fix topic...

    Quote

    Today i saw a weird thing on my uitooltip.

    If item with remain time stay into a shop, time shows: "Remain time 0 sec."

     

    Here's the fix:

    replace theese functions:

        def AppendUniqueItemLastTime(self, restMin):

        def AppendMallItemLastTime(self, endTime):

     

    Like this:

        def AppendUniqueItemLastTime(self, restMin):
            if restMin > 0:
                restSecond = restMin*60
                self.AppendSpace(5)
                self.AppendTextLine(localeInfo.LEFT_TIME + " : " + localeInfo.SecondToHM(restSecond), self.NORMAL_COLOR)

        def AppendMallItemLastTime(self, endTime):
            if endTime > 0:
                leftSec = max(0, endTime - app.GetGlobalTimeStamp())
                self.AppendSpace(5)
                self.AppendTextLine(localeInfo.LEFT_TIME + " : " + localeInfo.SecondToDHM(leftSec), self.NORMAL_COLOR)

     

    • Love 19
  6. On 2017. 09. 15. at 11:33 AM, xP3NG3Rx said:

    Hi there!

    Here you can see my all modifications about this codes, what I showed in my video, when you split or stack the same items the opening count will be correct always.
    <!> Carefully, it could be different name of variables, and different types what you have to fix by yourself <!>

      Reveal hidden contents
    
    
    //char_item.cpp -> bool CHARACTER::UseItemEx
    			case ITEM_GACHA:
    			{
    #ifdef ENABLE_NEWSTUFF
    				if (0 != g_BoxUseTimeLimitValue)
    				{
    					if (get_dword_time() < m_dwLastBoxUseTime + g_BoxUseTimeLimitValue)
    					{
    						ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ľĆÁ÷ °ńµĺ¸¦ ąö¸± Ľö ľř˝Ŕ´Ď´Ů."));
    						return false;
    					}
    				}
    
    				m_dwLastBoxUseTime = get_dword_time();
    #endif
    
    				DWORD dwBoxVnum = item->GetVnum();
    				std::vector <DWORD> dwVnums;
    				std::vector <DWORD> dwCounts;
    				std::vector <LPITEM> item_gets(0);
    				int count = 0;
    
    				if (GiveItemFromSpecialItemGroup(dwBoxVnum, dwVnums, dwCounts, item_gets, count))
    				{
    					long lOpenCount = item->GetSocket(0);
    					WORD wCount = lOpenCount / item->GetLimitValue(1), wRest = (lOpenCount % item->GetLimitValue(1));
    					item->SetSocket(0, item->GetSocket(0) - 1);
    					if (wRest == 1)
    						if (IS_SET(item->GetFlag(), ITEM_FLAG_STACKABLE) && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK) && item->GetCount() > 1)
    							item->SetCount(item->GetCount() - 1);
    						else
    							ITEM_MANAGER::instance().RemoveItem(item);
    
    					for (int i = 0; i < count; i++)
    					{
    						switch (dwVnums[i])
    						{
    						case CSpecialItemGroup::GOLD:
    							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("µ· %lld łÉŔ» ČąµćÇß˝Ŕ´Ď´Ů."), static_cast<long long>(dwCounts[i]));
    							break;
    						case CSpecialItemGroup::EXP:
    #ifdef ENABLE_ANTIEXP
    							if (!IsBlockedExpGaining())
    							{
    								ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óŔÚżˇĽ­ şÎĹÍ ˝ĹşńÇŃ şűŔĚ łŞżÉ´Ď´Ů."));
    								if (dwCounts[i] > 0)
    									ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%dŔÇ °ćÇčġ¸¦ ČąµćÇß˝Ŕ´Ď´Ů."), dwCounts[i]);
    							}
    							else
    								ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ľĆą«°Íµµ ľňŔ» Ľö ľřľú˝Ŕ´Ď´Ů."));
    #else
    							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óŔÚżˇĽ­ şÎĹÍ ˝ĹşńÇŃ şűŔĚ łŞżÉ´Ď´Ů."));
    							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%dŔÇ °ćÇčġ¸¦ ČąµćÇß˝Ŕ´Ď´Ů."), dwCounts[i]);
    #endif
    							break;
    						case CSpecialItemGroup::MOB:
    							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óŔÚżˇĽ­ ¸ó˝şĹÍ°ˇ łŞĹ¸łµ˝Ŕ´Ď´Ů!"));
    							break;
    						case CSpecialItemGroup::SLOW:
    							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óŔÚżˇĽ­ łŞżÂ »ˇ°Ł ż¬±â¸¦ µéŔ̸¶˝ĂŔÚ żňÁ÷ŔĚ´Â ĽÓµµ°ˇ ´Ŕ·ÁÁł˝Ŕ´Ď´Ů!"));
    							break;
    						case CSpecialItemGroup::DRAIN_HP:
    							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óŔÚ°ˇ °©ŔÚ±â ĆřąßÇĎż´˝Ŕ´Ď´Ů! »ý¸í·ÂŔĚ °¨ĽŇÇß˝Ŕ´Ď´Ů."));
    							break;
    						case CSpecialItemGroup::POISON:
    							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óŔÚżˇĽ­ łŞżÂ łě»ö ż¬±â¸¦ µéŔ̸¶˝ĂŔÚ µ¶ŔĚ żÂ¸öŔ¸·Î ĆŰÁý´Ď´Ů!"));
    							break;
    #ifdef ENABLE_WOLFMAN_CHARACTER
    						case CSpecialItemGroup::BLEEDING:
    							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óŔÚżˇĽ­ łŞżÂ łě»ö ż¬±â¸¦ µéŔ̸¶˝ĂŔÚ µ¶ŔĚ żÂ¸öŔ¸·Î ĆŰÁý´Ď´Ů!"));
    							break;
    #endif
    						case CSpecialItemGroup::MOB_GROUP:
    							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óŔÚżˇĽ­ ¸ó˝şĹÍ°ˇ łŞĹ¸łµ˝Ŕ´Ď´Ů!"));
    							break;
    						default:
    							if (item_gets[i])
    							{
    								if (dwCounts[i] > 1)
    									ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óŔÚżˇĽ­ %s °ˇ %d °ł łŞżÔ˝Ŕ´Ď´Ů."), item_gets[i]->GetName(), dwCounts[i]);
    								else
    									ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óŔÚżˇĽ­ %s °ˇ łŞżÔ˝Ŕ´Ď´Ů."), item_gets[i]->GetName());
    							}
    						}
    					}
    				}
    				else
    				{
    					ChatPacket(CHAT_TYPE_TALKING, LC_TEXT("ľĆą«°Íµµ ľňŔ» Ľö ľřľú˝Ŕ´Ď´Ů."));
    					return false;
    				}
    			}
    			break;

     

    
    
    //char_item.cpp -> bool CHARACTER::MoveItem
    		LPITEM item2;
    		if ((item2 = GetItem(DestCell)) && item != item2 && item2->IsStackable() &&
    				!IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_STACK) &&
    				item2->GetVnum() == item->GetVnum()) // ÇŐÄĄ Ľö ŔÖ´Â ľĆŔĚĹŰŔÇ °ćżě
    		{
    			for (int i = 0; i < ITEM_SOCKET_MAX_NUM; ++i)
    				if (i == 0 && item->GetType() == ITEM_GACHA)
    					item2->SetSocket(0, item->GetSocket(0) + item2->GetSocket(0));
    				else
    					if (item2->GetSocket(i) != item->GetSocket(i))
    						return false;
    
    			if (wCount == 0)
    				wCount = (WORD)item->GetCount();
    
    			sys_log(0, "%s: ITEM_STACK %s (window: %d, cell : %d) -> (window:%d, cell %d) count %d", GetName(), item->GetName(), Cell.window_type, Cell.cell, DestCell.window_type, DestCell.cell, wCount);

     

    
    
    //char_item.cpp -> bool CHARACTER::MoveItem
    		else if (wCount < item->GetCount())
    		{
    
    			sys_log(0, "%s: ITEM_SPLIT %s (window: %d, cell : %d) -> (window:%d, cell %d) count %d", GetName(), item->GetName(), Cell.window_type, Cell.cell, DestCell.window_type, DestCell.cell, wCount);
    
    			item->SetCount(item->GetCount() - wCount);
    			LPITEM item2 = ITEM_MANAGER::instance().CreateItem(item->GetVnum(), wCount);
    			// copy socket -- by mhh
    			FN_copy_item_socket(item2, item);
    			if (item->GetType() == ITEM_GACHA)
    			{
    				item->SetSocket(0, item->GetSocket(0) - wCount * item->GetLimitValue(1));
    				item2->SetSocket(0, wCount * item->GetLimitValue(1));
    			}
    
    			item2->AddToCharacter(this, DestCell);

     

    
    
    // item_manager.cpp -> LPITEM ITEM_MANAGER::CreateItem
    	else if (item->GetType() == ITEM_UNIQUE)
    	{
    		for (itertype (m_map_pkSpecialItemGroup) it = m_map_pkSpecialItemGroup.begin(); it != m_map_pkSpecialItemGroup.end(); it++)
    			if (it->second->m_bType == CSpecialItemGroup::SPECIAL && it->second->Contains(vnum))
    				item->SetSIGVnum(it->first);
    	}
    	else if (item->GetType() == ITEM_GACHA)
    		item->SetSocket(0, item->GetLimitValue(1) * count);
    
    
    	// »ő·Î »ýĽşµÇ´Â żëČĄĽ® Ăł¸®.
    	if (item->IsDragonSoul() && 0 == id)
    		DSManager::instance().DragonSoulItemInitialize(item);
    

     

     

    Thanks for the useful modifications @xP3NG3Rx! But there are some bug.

    1. Let's get 2 same kind of box which has for ex. 5 usage.
    2. Then use the two box until they has 2-2 max usage.
    3. Stack them.
    4. Take it apart.
    5. Now one box has 5 usage, the other has -1.

    I think the system needs to if you stack them remove one of the stack, because 2+2 < 5.

     

    Btw, as I see the wCount variable is defined, but not used in the case ITEM_GACHA function.

    wCount = lOpenCount / item->GetLimitValue(1)
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.