Jump to content

Cataclismo

Premium
  • Posts

    232
  • Joined

  • Last visited

  • Days Won

    7
  • Feedback

    0%

Everything posted by Cataclismo

  1. Recently I've seen that some costumes are removed instantly ( one of emotion masks too I think ) if they have REAL_TIME flag even if limitvalue is set correctly. My question is: the costumes were wrong configured in item_proto or it's a bug? If it's a bug, NO, I DON'T want any bug fix... because I'have already maked it work with my current item_proto. I am just wondering if I worked for nothing
  2. You do not understood me ^.^ I don't know why exactly the flags don't update well ( and I was too lazy to search where this happen ). And also: GetImmuneFlag returns the field "dwImmuneFlag" from item_proto, not the bonuses from item_proto ... so the server should still search for flags in proto. It should search because I saw servers with immunes on armors and so on... So? ^.^
  3. Hi everyone, I don't know if there is already a solution, but if it is I couldn't find it and I am sorry. I will post a solution found by me today. How does actually this bug works? Well, when you enter in game you will not have anti-stun until you will change the equipment and if your shield or your anti-stun item is not last then you will still not have that bonus. I saw some people trying to work with item->GetImmuneFlag() and m_pProto->dwImmuneFlag , but those functions does not return the immune bonuses... those functions returns values from item_proto so you should avoid them. I don't know exactly how this bug exactly works, but I found a solution. After you see it you may think that it's a performance issue, but it's still a fix. Of course, you can make all immunes 100% and in that case FALL will be there too and this is a problem. Of course, you can check and make 100% immune only stun, but that would mean you gived up (at least I feel that xD ). So... let's start. Search in char.h for : IsImmune(DWORD dwImmuneFlag); And add after: void UpdateImmuneFlags(); Now open char_resist.cpp and search for: #include "locale_service.h" And add after : #include "item.h" Now search in the same file for: bool CHARACTER::IsImmune(DWORD dwImmuneFlag) And add on the first line (after { ) : if (!IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag)) // that means bug may be here UpdateImmuneFlags(); // we update flags And add this BEFORE the function : void CHARACTER::UpdateImmuneFlags() { m_pointsInstant.dwImmuneFlag = 0; // the flag may be reseted because we changed the equipment, but let's be sure for (int i = 0; i < WEAR_MAX_NUM; i++) // we check the entire uquipment... because immune on armor : and maybe other items { if(GetWear(i)) { for (int i2 = 0; i2 < ITEM_APPLY_MAX_NUM; ++i2) // we check the bonuses from proto { if (GetWear(i)->GetProto()->aApplies[i2].bType == APPLY_NONE) continue; else if(GetWear(i)->GetProto()->aApplies[i2].bType == APPLY_IMMUNE_STUN) // we found stun? SET_BIT(m_pointsInstant.dwImmuneFlag, IMMUNE_STUN); // we set stun else if(GetWear(i)->GetProto()->aApplies[i2].bType == APPLY_IMMUNE_SLOW) // we found slow? SET_BIT(m_pointsInstant.dwImmuneFlag, IMMUNE_SLOW); // we set slow else if(GetWear(i)->GetProto()->aApplies[i2].bType == APPLY_IMMUNE_FALL) // finally, we found fall? SET_BIT(m_pointsInstant.dwImmuneFlag, IMMUNE_FALL); // we set fall } for (int i3 = 0; i3 < ITEM_ATTRIBUTE_MAX_NUM; ++i3) // we check the bonuses from item { if (GetWear(i)->GetAttributeType(i3)) { const TPlayerItemAttribute& ia = GetWear(i)->GetAttribute(i3); if(ia.bType == APPLY_IMMUNE_STUN) // we found stun? SET_BIT(m_pointsInstant.dwImmuneFlag, IMMUNE_STUN); // we set stun else if(ia.bType == APPLY_IMMUNE_SLOW) // we found slow? SET_BIT(m_pointsInstant.dwImmuneFlag, IMMUNE_SLOW); // we set slow else if(ia.bType == APPLY_IMMUNE_FALL) // finally, we found fall? SET_BIT(m_pointsInstant.dwImmuneFlag, IMMUNE_FALL); // we set fall } } } } } Now... how actually that works? Everytime you will get attacked the server will automatically check if you have anti-stun. If server will find that you don't have will update the flags using my function and will check again and now will actually "see" if you really have anti-stun. Now some of you will probably think: "Wait... this function only add immune flags... what about deleting them?" The answer is simple: server does that and it does correctly. So don't worry. I tested that and it worked for me. This will be probably the only fix I will post over here. Why? People do not appreciate and usually they say that is copied or is theirs. At least my country does that (Romania) and every guy who just discovered the colors from syntax highlighters is saying that he knows to code. Dat country and dat people. "GG izy" Hope this will help you. If you find something wrong in my code then I am sorry.
  4. Search for: import __builtin__ and add EXACTLY under the code, but first check indent (tabs). Question: I found codes that begins with 0x77 instead of 0xFF, shouldn't I replace these too?
  5. I was wrong. It seems the problems came when I import os. Strange. I will try some libs and I will come back with update if I found something.
  6. If I use my 40k client root, locale and uiscript when I execute metin2client.exe it opens black and appears: But if I use the root, locale and uiscript from the novaline source it DON'T start and appears only the above error. EDIT: After 6 hours of music, streams and error tracing in metin2 client I've found that in ui.py it's a piece of code which don't belong to there (or it does?) or it's broken: class Window(object): def SetClickEvent(self, event): self.clickEvent = __mem_func__(event) def OnMouseLeftButtonDown(self): if self.clickEvent: self.clickEvent() def NoneMethod(cls): pass NoneMethod = classmethod(NoneMethod) def __init__(self, layer = "UI"): self.clickEvent = None self.hWnd = None self.parentWindow = 0 self.onMouseLeftButtonUpEvent = None self.RegisterWindow(layer) self.Hide() I replaced ui.py with an old one. If I get another errors because I did that I will announce you and I will try to repair it.
  7. I know that. That's why I specified that I used two different dlls. I downloaded official client and I took granny2.dll from that and now it opens. Now let's repair all the errors xD
  8. Branch: novaline Mode: Release Resolved almost all warnings and errors I've found. I used original granny2.dll and granny2.dll from include_stuff and no one works. Why? What I am supposed to do?
  9. 2,60GB with my 200kb/s download speed i will probably download this in a few hours. I just wanted the client launcher source... but whatever. I will try to download it later...
  10. I saw a lot of people modifying launcher so I am wondering if somebody could give me the source code, please. Thank you.
  11. I saw a lot of people modifying launcher so I am wondering if somebody could give me the source code, please. Thank you.
×
×
  • 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.