Jump to content

HiTmAn

Members
  • Posts

    8
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by HiTmAn

  1. Hi!

    Fixes all errors on mangos-0.12 at once.

    diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp
    index 20dc625..fcdde01 100644
    --- a/src/game/Mail.cpp
    +++ b/src/game/Mail.cpp
    @@ -519,7 +519,8 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data )
        // client can't work with packets > max int16 value
        const uint32 maxPacketSize = 32767;
    
    -    uint32 mails_count = 0;                                 // real send to client mails amount
    +    uint32 mailsCount = 0; // send to client mails amount
    +    uint32 realCount = 0; // real mails amount
    
        WorldPacket data(SMSG_MAIL_LIST_RESULT, (200));         // guess size
        data << uint8(0);                                       // mail's count
    @@ -616,10 +617,12 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data )
                data << (uint32) (item ? item->GetUInt32Value(ITEM_FIELD_DURABILITY) : 0);
            }
    
    -        mails_count += 1;
    +        mailsCount += 1;
    +        realCount += 1;
        }
    
    -    data.put<uint8>(0, mails_count);                        // set real send mails to client
    +    data.put<uint32>(0, realCount); // this will display warning about undelivered mail to player if realCount > mailsCount
    +    data.put<uint8>(4, mailsCount); // set real send mails to client
        SendPacket(&data);
    
        // recalculate m_nextMailDelivereTime and unReadMails
    

    bye

    HiTmAn

  2. Thanks for update of branch, i`ve pulled your changes.

    HiTmAn, do you have a problem with guard in contested cities like Gadgetzan or Booty Bay when the guards don`t attack the player who started PvP battle in the city?

    And there is one more problem, with mobs too, but in instances. The problem is that the mobs do not come back to their initial position when they kill the player, who pulled them, and stay on the place where they did kill him.

    In contested cities mobs don't attack if players only use dots but I think it has nothing to do with mtmaps.

    I will try and test it again without mtmaps and report it back.

    Also what about the new ObjectAccessor.cpp ? I see you changed it back without carrying about the new changes like "_buildUpdateObject(obj, update_players);" ? Does it work ?

    Maybe we should discuss about these things in the original mtmaps thread ;)

    bye

    HiTmAn

  3. Hi everybody!

    I don't know if this is the right forum because it has to do with MaNGOS and ScriptDev2, I will post this here. Also if it's the wrong section, please move it ;)

    I noticed that many boss encounter addons don't work and I researched in the lua scripts. The "problem" is plain easy:

    MaNGOS adds a space after the name of the NPC doing the emote. e.g. "[big tied up Mob (I hope you know who I mean ;)] 's bonds begin to weaken!"

    Here is what I've changed to remove the space...

    diff --git a/src/game/Object.cpp b/src/game/Object.cpp
    index 24ce65d..ac1f301 100644
    --- a/src/game/Object.cpp
    +++ b/src/game/Object.cpp
    @@ -1301,9 +1301,9 @@ void WorldObject::BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const*
            *data << (uint32)1;                                 // target name length
            *data << (uint8)0;                                  // target name
        }
    -    *data << (uint32)(strlen(text)+1+(pre?3:0));
    +    *data << (uint32)(strlen(text)+1+(pre?2:0));
        if(pre)
    -        data->append("%s ",3);
    +        data->append("%s",2);
        *data << text;
        *data << (uint8)0;                                      // ChatTag
    }
    

    It works great if the emote is triggered by ScriptDev2's DoScriptText. If you use ".npc textemote begins to..." there's one space missing "[NPC]begins to..." but as we all know SD2 just use MaNGOS functions, so it cant be the problem.

    I hope you understand what I mean and help fix this ;)

    bye

    HiTmAn

×
×
  • 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