Jump to content

Toinan67

Members
  • Posts

    389
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Toinan67

  1. Hi !

    It's been a very long time since i posted, i'm pleased to be back :)

    I have a question about the ByteBuffer class, which is the parent class of WorldPacket.

    If i understood correctly, when you do this :

    uint32 value;
    
    packet >> value;
    

    You get into that function :

           ByteBuffer &operator>>(uint32 &value)
           {
               value = read<uint32>();
               return *this;
           }
    

    Which ultimately calls that function :

    template <typename T> T read(size_t pos) const
           {
               if(pos + sizeof(T) > size())
                   throw ByteBufferException(false, pos, sizeof(T), size());
               T val = *((T const*)&_storage[pos]);
               EndianConvert(val);
               return val;
           }
    

    _storage is a vector<uint8>.

    I have a problem with :

    T val = *((T const*)&_storage[pos]);
    

    (sorry about the code display, it seems like there is some troubles)

    So basically we're storing a uint32 in a uint8 ?!

    Then why do we use uint32? Why not using uint8 everywhere?

    And why is this line so complicated? Why not :

    T val = _storage[pos];
    

    I hope i've been clear :)

    Thank you!

  2. If you're on Unix :

    grep "latency" mangos/src

    You'll find everything you want, especially this :

    pPlayer->GetSession()->GetLatency();

    So I suggest a simple timer in WorldSession::Update such as :

    if (m_latencyCheckTimer < diff)
    {
       if (GetLatency() > 500 /*replace it by whatever you want*/)
       {
           KickPlayer();
           m_latencyCheckTimer = 1 * MINUTE * IN_MILLISECONDS;
       }
    } else m_latencyCheckTimer = 1 * MINUTE * IN_MILLISECONDS;
    

    Very basic, but you can improve it if you want (take values from conf, write something about the kicked player in logs, etc) ;)

    Edit : actually my code is really bad, since a player could have a huge lag for 2 or 3 secs and be kicked just because the check would occur during those 2 or 3 secs.

  3.     TrainerSpellData const* cSpells = unit->GetTrainerSpells();
       TrainerSpellData const* tSpells = unit->GetTrainerTemplateSpells();
    
       if (!cSpells && !tSpells)
       {
           DEBUG_LOG("WORLD: SendTrainerList - Training spells not found for %s", guid.GetString().c_str());
           return;
       }
    
       uint32 maxcount = (cSpells ? cSpells->spellList.size() : 0) + (tSpells ? tSpells->spellList.size() : 0);
    
       WorldPacket data( SMSG_TRAINER_LIST, 8+4+4+maxcount*38 + strTitle.size()+1);
       data << ObjectGuid(guid);
       data << uint32(cSpells->trainerType ? cSpells->trainerType : tSpells->trainerType);

    Something wrong with the last line : we use cSpells->trainerType without being sure it's not NULL.

    data << uint32(cSpells && cSpells->trainerType ? cSpells->trainerType : tSpells->trainerType);

    might be better?

  4. I have learned so many things, and all just because of this project.

    This should be MaNGOS motto.

    I've learned so many things too...

    I strongly support this idea of creating a legal body around MaNGOS. Legal issues have always created debates inside and outside the community, and today what you plan to do might end those debates. I have absolutely no knowledge is legal stuff, I don't know if your plan is even possible, but I really think this could be a great improvement.

    However I have a few questions :

    - what would this "legal body" be actually?

    - what will we have to do to be "protected" inside this legal body ? About that, I'm thinking of some "bad" people who might use this legal body to justify their unauthorized use of MaNGOS...

    Is something like that going to be a problem?

    - you were talking about a "founding documentation".... I can't find it at the moment, neither on the index, nor on the wiki

    Anyway, since my arrival I'm amazed by what this community can achieve. There are a lot of very talented and interesting people around here, Vladimir, laise, Lynx3d, NoFantasy, TOM_RUS, Ambal, faramir118, qsa, Schmoo, zergtmn, and everyone else... (the sheep included :P)

    I'm thankful to all of them to be a part of this project!

    MaNGOS should be a citizenship.

  5. Hi,

    (Glad to be back!)

    I wanted to update my MaNGOS install (3 month without doing it) on my OS X.

    I got the same error as Shin Darth :

    /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I../../../../dep/ACE_wrappers -I.. -DACE_BUILD_DLL -D_REENTRANT -D_THREAD_SAFE -W -Wall -Wpointer-arith -g -O2 -pipe -O -MT libACE_la-DLL_Manager.lo -MD -MP -MF .deps/libACE_la-DLL_Manager.Tpo -c -o libACE_la-DLL_Manager.lo `test -f 'DLL_Manager.cpp' || echo '../../../../dep/ACE_wrappers/ace/'`DLL_Manager.cpp

    libtool: compile: g++ -DHAVE_CONFIG_H -I../../../../dep/ACE_wrappers -I.. -DACE_BUILD_DLL -D_REENTRANT -D_THREAD_SAFE -W -Wall -Wpointer-arith -g -O2 -pipe -O -MT libACE_la-DLL_Manager.lo -MD -MP -MF .deps/libACE_la-DLL_Manager.Tpo -c ../../../../dep/ACE_wrappers/ace/DLL_Manager.cpp -fno-common -DPIC -o .libs/libACE_la-DLL_Manager.o

    mv -f .deps/libACE_la-DLL.Tpo .deps/libACE_la-DLL.Plo

    /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I../../../../dep/ACE_wrappers -I.. -DACE_BUILD_DLL -D_REENTRANT -D_THREAD_SAFE -W -Wall -Wpointer-arith -g -O2 -pipe -O -MT libACE_la-Date_Time.lo -MD -MP -MF .deps/libACE_la-Date_Time.Tpo -c -o libACE_la-Date_Time.lo `test -f 'Date_Time.cpp' || echo '../../../../dep/ACE_wrappers/ace/'`Date_Time.cpp

    libtool: compile: g++ -DHAVE_CONFIG_H -I../../../../dep/ACE_wrappers -I.. -DACE_BUILD_DLL -D_REENTRANT -D_THREAD_SAFE -W -Wall -Wpointer-arith -g -O2 -pipe -O -MT libACE_la-Date_Time.lo -MD -MP -MF .deps/libACE_la-Date_Time.Tpo -c ../../../../dep/ACE_wrappers/ace/Date_Time.cpp -fno-common -DPIC -o .libs/libACE_la-Date_Time.o

    ../../../../dep/ACE_wrappers/ace/DLL_Manager.cpp: In member function 'void ACE_DLL_Handle::get_dll_names(const ACE_TCHAR*, ACE_Array<ACE_String_Base<char> >&)':

    ../../../../dep/ACE_wrappers/ace/DLL_Manager.cpp:437: error: 'ACE_LIB_TEXT' was not declared in this scope

    make[6]: *** [libACE_la-DLL_Manager.lo] Error 1

    Any idea?

    Thanks

  6. (i don't want to interfere in the debate, just sending tests results)

    Are you sure that if you are unreachable target will not even try to come closer?

    Yes, I am 100% sure.

    If you become unreachable, it will evade instantly. If you were already unreachable, it will wait 26 seconds to see if you become reachable again. Then, it will evade.

    I noticed something new, though. If you move just a little bit after attacking it, going left and right on 1 meter, it will evade much more faster (something like 3-4 seconds after you started).

    Overall this seems not very natural behavior to me

    I find it quite natural, if you start a fight with someone, they force you to _fight_ and become reachable, by constantly regenerating the victim's life, and making your attacks miss all the time. If you attack a mob, they want you to be able to be killed by this mob. Quite normal ^^

    About threat, the threat doesn't change during those 26 seconds. It doesn't reset, goes down, anything. It stays at its value.

    For multiple targets....actually I have no idea how to become unreachable after attacking the target. Searching for spots....

    For the previous tests I just used my flying mount to run next to the mob and then go up.

    I need a place where I can damage the mob, and then jump on something where it can't reach me. Ideas? ^^

    (if faramir could show me where is the spot he was talking about in maghteridon's lair, for example)

    Edit: well I managed to do it with my totems.

    Apparently (according to omen), if the main target becomes unreachable, it is simply deleted from the threat list.

    I aggro a mob, put it next to my magma totem, stay here for a few seconds. Then, I go up : I am instantly out of combat, out of the threat list, and the mob attacks my totem.

    If I go reachable again, while the mob is attacking the totem, I don't get my threat back, I'm just a "new" target.

  7. a good database for cata?

    Seriously, it seems like some people want a private cataclysm server before the real one is out. Wtf ?!

    Stop asking for cataclysm support all the time, the official release date is december 7th (for my country), what do you think devs can do ? Yes, they're good, but I really doubt they can achieve before Blizzard what Blizzard is developing at this moment.

    It's like asking for a pirated software before the real one is out.

    Sorry if I'm rude....but sometimes I feel like I have to be so that people understand.

  8. Tests results!

    Environnement : I made the tests with a character lvl 84, in outland (vs lvl 70 mobs), and in deepholm (a new cataclysm zone, vs lvl 82-83 mobs).

    It may be unclearly presented...but it's what happen on retail

    The tests begin when you're out of combat, noone attacking, you're not attacking anyone.

    So here are the results :

    - If you attack a mob while you're reachable :

    - if you stay where you are : normal behavior, he just chases you till he dies, you die, or you flee

    - if you become unreachable :

    - if there is another target (for me, it was my magma totem) :

    - he attacks the other target. When this target dies, if there is another reachable target, he attacks it. Otherwise, evade immediatly

    - if there is no other target :

    - evade immediatly (not even 1 second of waiting)

    - If you attack a mob while you're unreachable :

    - he doesn't move from where he stands at the moment, he just faces us

    - he attacks with ranged attacks/spells if he can, otherwise it does nothing.

    - if he does not attack you with ranged attack/spell, he evades after precisly 26 seconds (don't ask me why).

    It was the same 26 seconds for lvl 70, 71, 82 or 83 mob.

    - if you become reachable before 26 seconds, he starts chasing you, and attacking you.

    - he seems to be in a "nearly evading" state, because :

    - as long as you're unreachable, you can't reach him either ("miss" all the time), unless he attacks you with ranged attacks/spells.

    In that case, you cannot reach him all the time, but just when he casts his attack/spell (this part was a bit unclear for me...)

    - he is constanly regenerating full life/mana (every 2 or 3 sec.).

    - it seems like retail has some troubles too : I attacked a mob while I was unreachable several times.

    Then, when I tried to attack him being reachable, he wasn't able to chase me anymore, he was rooted.

    I hope you will find some useful informations here, please tell me if you want more precise testing.

  9. Gotisch : thanks for summarizing it all up. It is pretty accurate and will surely help people too lazy following the walls of text from above :)

    ...and it helps people who read the wall of text, but think it's difficult to understand sometimes ^^

    I have access to a retail account, what could I do exactly to help?

    I can only test with a single player, or maybe with my player + a pet.

    I'm almost 100% sure they do it by either dropping unreachable target or reducing its threat by %.

    I can see what's happening with the threat with Omen or something like that

  10. Only if you have a recent graphics card. If you are lucky to only work on mobile systems, you will see WoW in the same visual state vanilla WoW was in.

    Absolutely true...my graphic card can't do it :/

    But we're in 2010, my 2008 computer is an ancient relic now.

×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use