-
Posts
196 -
Joined
-
Last visited
-
Days Won
14 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Everything posted by Abel(Tiger)
-
Question about a condition in c++
Abel(Tiger) replied to Kafa's topic in Community Support - Questions & Answers
BYTE bMaxItemSize = 1; const CSpecialItemGroup* pGroup = ITEM_MANAGER::instance().GetSpecialItemGroup(dwBoxVnum); if (pGroup) { for (int i = 0; i < pGroup->GetGroupSize(); i++) { const TItemTable* itemTable = ITEM_MANAGER::instance().GetTable(pGroup->GetVnum(i)); if(itemTable) { if(itemTable->bSize > bMaxItemSize) { bMaxItemSize = itemTable->bSize; if(bMaxItemSize == 3) break; } } } } if(GetEmptyInventory(bMaxItemSize) == -1) { ChatPacket(CHAT_TYPE_INFO, "You need %d perpendicular slots in your inventory to open the Chest.", bMaxItemSize); return false; } Place it in char_item.cpp inside case ITEM_GIFTBOX: after dwBoxVnum. (there are other cases for other types of chests, this instruction is only for giftbox type). Also I think the max size from the chest must be a info loaded when the special group is loaded and saved in a variable. The code I posted for you increases the time complexity of the function and it's not a good ideea -
fix Fix unknown header 100% server: 1k player online francec
Abel(Tiger) replied to Draveniou1's topic in Bug Fixes
If you don't sent it to the server with some keys it doesn't matter what it have in it, all that matter is the size of the struct. And if you sent it with some keys to check on the server the only thing that matter it's the address of the struct in memory and the size of the struct, after that the keys are easy to find. -
Shop Search System (No ItemIndex!) Problem
Abel(Tiger) replied to blaxis's topic in Community Support - Questions & Answers
Did you try to click on the line of the item before you click on "Buy" ? -
fix Fix unknown header 100% server: 1k player online francec
Abel(Tiger) replied to Draveniou1's topic in Bug Fixes
So you think that long array it's 900 bytes ? :))) It's actualy 36 bytes (288 bits) and yeah it can be found. This how it looks in memory (initialized with 1) And this is how it looks if it's 250+ bytes -
fix Fix unknown header 100% server: 1k player online francec
Abel(Tiger) replied to Draveniou1's topic in Bug Fixes
Maybe they didn't because your server is not that popular. Your method is so fucked up and no one should use that. Yes I agree with a single byte argument for version control or smth but wtf is this ? int wertgwertgetdfgsdfgsdgdsfggrgergrgyergh[8]; long fghfghfgjfgsdfsdfsdfgjhfgjhdfhdhd[9]; int AWERWQRWsdfgsdgfsdgsdQEREFRSF[8]; long gsdfsfwetwersdgsdfgsdgwertfwetfwefwefgUiet[9]; int WETWETWdfgdfgdfgfghERTFWEFTWEFTWEFGWE[8]; long SDFWETGfhdfhdfghERTGWETFWERFWRFWQRQWRQWRt[9]; int WETFWEWEfgsdsdhgsdsdghsdghsdTFGWETGWETGWEGWGWETGTG[8]; Do you realize your login it's going to be very slow if that packet is large ? And who the fuck said you can't find the key if it's stored in 250 bytes ? -
i'm looking for the effects file
Abel(Tiger) replied to bossy_max's topic in Community Support - Questions & Answers
I think that's the effect from Rubinum server but colored diferent. Contact Rubinum admins and maybe they will give it to you. (or stole it ) -
You can't just to get them, there are some operations made to get those values. Here is the entire documentation of granny (search GrannyUpdateModelMatrix): [Hidden Content]
- 9 replies
-
- 16
-
// Search: if (40.0f < fabs(modelMatrix[3][1])) bIsAccumulationMotion = true; // Add this line before that if: modelMatrix[3][1] = animation->TrackGroups[trackIndex]->LoopTranslation[1];
-
Yeah, that's a good approach. I think it's about what you want to sacrifice time or player experience (also if a channel it's not online something is wrong and need to be fixed asap, a good server never crash or maybe once a year ) Yeah, I know, I just said things that can happen without proper checks.
-
Good job The ideea with geting the port from db it's nice (I think wom started this ideea some time ago), but not very good when we speak about a big server that use the db a lot (longer times when changing the channel). My advice it's to send all other channels info to every channel at boot and that will help you with more than change channel (now the current channel recieve the info about ch99 and other cores of the current channel if I'm not mistaken). The IsHack check is bad placed there and it can cause big problem for the server (players start the timer and jump over the check but in those 10 seconds they can open safebox and other stuff), also I recommend you use both CanWarp and IsHack checks because people skip one or the other when they implement new stuff
-
Wom2 Trade Panel link? Trade Chat link?
Abel(Tiger) replied to Shahin's topic in Community Support - Questions & Answers
If I'm not mistaken the exchange info is in the leaked rubinum source. The trade chat is easy to made. -
Those ~5px are for the shadows if I'm not mistaken. Also the ideea made by Ymir to open the client in two diferent position is stupid. I consider opening the windowed client on the center it's the best solution: if (Windowed) { m_isWindowed = true; RECT rc; GetClientRect(&rc); int windowWidth = rc.right - rc.left; int windowHeight = (rc.bottom - rc.top); // 80 is the gap for the taskbar, you can increase it CMSApplication::SetPosition((GetScreenWidth() - windowWidth) / 2, (GetScreenHeight() - windowHeight - 80) / 2); } else { m_isWindowed = false; SetPosition(0, 0); }
-
How to double q.set_counter in one quest?
Abel(Tiger) replied to player's topic in Community Support - Questions & Answers
From what I know you can't set two counters on the same quest. Official server has some quests where you need to kill multiple monsters but the counter is set when you kill one of the monsters. Example: you kill Wild Dog and it will apear wild dog counter, you kill hungry wild dog and it will apear the counter for that one. -
Did you try to increase this char list ?
-
I think it's a compiling problem, not a source problem (I had a similar problem in the past) so try these things: 1. Don't compile with -j flag when you move to production 2. Try downgrade c++2a to c++14 or c++11 3. If 1 and 2 don't work try to upgrade clang to version 10 (I think you use 9)
-
What compiler do you use for compiling the db, what freebsd for compiling and what freebsd for runing, also do you compile with -j ?
-
MALL window item's size bug
Abel(Tiger) replied to TMP4's topic in Community Support - Questions & Answers
That variable it's always 1 for the mall window, my advice is to compare all the code from function CClientManager::RESULT_SAFEBOX_LOAD with a clasic one and solve the bug with the addresses I told you about. -
MALL window item's size bug
Abel(Tiger) replied to TMP4's topic in Community Support - Questions & Answers
For the mall the grid is placed on the db, check ClientManager.cpp bellow this line: CGrid grid(5, MAX(1, pi->pSafebox->bSize) * 9); Also try this (a common bug in metin2 source): In ClientManagerBoot.cpp search: sort(m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum()); And move it before the iterator is initialized like this: m_map_itemTableByVnum.clear(); // Now it's here sort(m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum()); itertype(m_vec_itemTable) it = m_vec_itemTable.begin(); while (it != m_vec_itemTable.end()) { TItemTable * item_table = &(*(it++)); sys_log(1, "ITEM: #%-5lu %-24s %-24s VAL: %ld %ld %ld %ld %ld %ld WEAR %lu ANTI %lu IMMUNE %lu REFINE %lu REFINE_SET %u MAGIC_PCT %u", item_table->dwVnum, item_table->szName, item_table->szLocaleName, item_table->alValues[0], item_table->alValues[1], item_table->alValues[2], item_table->alValues[3], item_table->alValues[4], item_table->alValues[5], item_table->dwWearFlags, item_table->dwAntiFlags, item_table->dwImmuneFlag, item_table->dwRefinedVnum, item_table->wRefineSet, item_table->bAlterToMagicItemPct); // Also you can insert these values after the sort but because we // already looping through the list of items once (for the syslog), it's better to // move the sort function above (the complexity is half this way) m_map_itemTableByVnum.insert(std::map<DWORD, TItemTable *>::value_type(item_table->dwVnum, item_table)); } // It was here return true; -
Enable enter keys in confirm dialogs
Abel(Tiger) replied to ReFresh's topic in Community Support - Questions & Answers
Or you can call the accept button event like this: def OnIMEReturn(self): if self.acceptButton: self.acceptButton.CallEvent() return True -
Written shop title in shop name?
Abel(Tiger) replied to ReFresh's topic in Community Support - Questions & Answers
Right, uiPrivateShopBuilder.py -> class PrivateShopAdvertisementBoard(ui.ThinBoard): add these: -
The code you posted can be explained like this: When I get a sash (mostly with /item command) I will get (1,2,3 or 4) absortion based on sash type (wtf???) and with that discrete_distribution I have a change to get +abs. Example: I have a small change to get a type 1 sash with 6 absortion Please don't copy code from other files if you don't know what it does. Rubinum used discrete_distribution when you combine two level 4 sashes for the +abs PS: the code you posted is from item.cpp not char_item.cpp
-
Written shop title in shop name?
Abel(Tiger) replied to ReFresh's topic in Community Support - Questions & Answers
Take this: [Hidden Content] Compare the folders and copy the changes in your root source. PS: you might already have interface binded- 4 replies
-
- 19
-
Account Save without Admin rights
Abel(Tiger) replied to piktorvik's topic in Community Support - Questions & Answers
Yes. Save them in a file inside the folder of the client and hash them somehow with a unique identifier (like mac address, or something like that) so only that computer can acces them in case of stolen.