Jump to content

bloutix

Members
  • Posts

    14
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by bloutix

  1. diff --git a/src/game/Player.cpp b/src/game/Player.cpp
    index 3bad0f3..374af37 100644
    --- a/src/game/Player.cpp
    +++ b/src/game/Player.cpp
    @@ -14369,7 +14369,7 @@ void Player::KilledMonsterCredit( uint32 entry, ObjectGuid guid )
                continue;
            // just if !ingroup || !noraidgroup || raidgroup
            QuestStatusData& q_status = mQuestStatus[questid];
    -        if( q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid())
    +        if( q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
            {
                if( qInfo->HasFlag( QUEST_MANGOS_FLAGS_KILL_OR_CAST) )
                {

    Just a parenthesis was missing

    ;)

  2. Unhandled exception at 0x7770dcbb in mangosd.exe: 0xC0000374: A heap has been corrupted.

    Le thread 'Thread Win64' (0xc90) s'est arrêté avec le code 0 (0x0).

    'mangosd.exe'*: Chargé 'C:\\Users\\Bloutix\\Desktop\\web dev\\Mangos\\my release\\mangosscript.dll', Le fichier binaire n'a pas été généré avec les informations de débogage.

    Le thread 'Thread Win64' (0xb50) s'est arrêté avec le code 0 (0x0).

    Critical error detected c0000374

    Windows a déclenché un point d'arrêt dans mangosd.exe.

    Cela peut être dû à une défaillance du tas qui indique un bogue dans mangosd.exe ou l'une des DLL chargées.

    Cela peut également être dû à l'appui sur la touche F12 lorsque mangosd.exe a le focus.

    La fenêtre Sortie peut contenir des informations de diagnostic supplémentaires.

    Exception de première chance à 0x77276cd2 dans mangosd.exe*: 0xC0000374: Un segment de mémoire a été endommagé.

    Exception non gérée à 0x77276cd2 dans mangosd.exe*: 0xC0000374: Un segment de mémoire a été endommagé.

    'mangosd.exe'*: Chargé 'C:\\Windows\\System32\\FWPUCLNT.DLL', Cannot find or open the PDB file

    Le thread 'Thread Win64' (0xa0c) s'est arrêté avec le code 0 (0x0).

    Le thread 'Thread Win64' (0xc34) s'est arrêté avec le code 0 (0x0).

    Le thread 'Thread Win64' (0x970) s'est arrêté avec le code 0 (0x0).

    This is the problem maybe it's after database loading in SD2 when it's freeing memory for spellsummary

    In SD2 ScriptMgr.cpp:

    struct TSpellSummary {
       uint8 Targets;                                          // set of enum SelectTarget
       uint8 Effects;                                          // set of enum SelectEffect
    }extern *SpellSummary;
    
    MANGOS_DLL_EXPORT
    void ScriptsFree()
    {
       // Free Spell Summary
       delete []SpellSummary;
    
       // Free resources before library unload
       for(int i=0; i<MAX_SCRIPTS; ++i)
           delete m_scripts[i];
    
       num_sc_scripts = 0;
    }
    

    It's just an idea

    And in VC2010 intellisense warn an error with TSpellSummary *SpellSummary at line 56

    Sorry for my bad english but I'm french

  3. This code can help you althoug it isn't correct ;)

    bool ChatHandler::HandlePlayerSayCommand(const char* args)
    {
       if(!*args)
           return false;
    Player* chr = getSelectedPlayer();
    
    if (!chr)
       {
           SendSysMessage(LANG_NO_CHAR_SELECTED);
           SetSentErrorMessage(true);
           return false;
       }
       chr->Say(args, LANG_UNIVERSAL, 0);
       return true;
    }
    bool ChatHandler::HandlePlayerYellCommand(const char* args)
    {
       Player* chr = getSelectedPlayer();
    
    if (!chr)
       {
           SendSysMessage(LANG_NO_CHAR_SELECTED);
           SetSentErrorMessage(true);
           return false;
       }
       chr->Yell(args, LANG_UNIVERSAL, 0);
       return true;
    }
    //show text emote by creature in chat
    bool ChatHandler::HandlePlayerTextEmoteCommand(const char* args)
    {
       if(!*args)
           return false;
       Player* chr = getSelectedPlayer();
    
    if (!chr)
       {
           SendSysMessage(LANG_NO_CHAR_SELECTED);
           SetSentErrorMessage(true);
           return false;
       }
       chr->TextEmote(args, 0);
       return true;
    }
    

  4. In Trinity Core mind control of the eye is functionnal.

    Maybe any developper can look in trinity source for summon and mind control system for eye of archerus.

    Or just you can indicate me where i can search for fix the current mind control system

    Sorry for my english if look like strange

    Best resgards

  5. [Patch]Limiting Characters per Account

    What it does: This patch is used to limit the number of characters per Account via the file conf.

    This patch is after my previous patch named "Limiting Characters per Realm".

    Index: src/game/CharacterHandler.cpp
    ===================================================================
    --- src/game/CharacterHandler.cpp        (revision 6497)
    +++ src/game/CharacterHandler.cpp        (working copy)
    @@ -223,6 +223,22 @@
                    return;
            }
    
    +        QueryResult *resultacct = LoginDatabase.PQuery("SELECT SUM(numchars) FROM realmcharacters WHERE acctid = '%d'", GetAccountId());
    +        uint8 acctcharcount = 0;
    +        if ( resultacct )
    +        {
    +                Field *fields=resultacct->Fetch();
    +                acctcharcount = fields[0].GetUInt8();
    +                delete resultacct;
    +
    +                if (acctcharcount >= sWorld.getConfig(CONFIG_CHARACTERS_PER_ACCOUNT))
    +                {
    +                        data << (uint8)CHAR_CREATE_ACCOUNT_LIMIT;
    +                        SendPacket( &data );
    +                        return;
    +                }
    +        }
    +
            QueryResult *result = CharacterDatabase.PQuery("SELECT COUNT(guid) FROM characters WHERE account = '%d'", GetAccountId());
            uint8 charcount = 0;
            if ( result )
    Index: src/game/World.cpp
    ===================================================================
    --- src/game/World.cpp        (revision 6497)
    +++ src/game/World.cpp        (working copy)
    @@ -463,6 +463,13 @@
            m_configs[CONFIG_STRICT_CHARTER_NAMES] = sConfig.GetIntDefault("StrictCharterNames", 0);
            m_configs[CONFIG_STRICT_PET_NAMES]         = sConfig.GetIntDefault("StrictPetNames",         0);
    
    +        m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = sConfig.GetIntDefault("CharactersPerAccount", 50);
    +        if(m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] < 1 || m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] > 50)
    +        {
    +                sLog.outError("CharacterPerAccount (%i) must be in range 1..50. Set to 50.",m_configs[CONFIG_CHARACTERS_PER_ACCOUNT]);
    +                m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = 50;
    +        }
    +
            m_configs[CONFIG_CHARACTERS_PER_REALM] = sConfig.GetIntDefault("CharactersPerRealm", 10);
            if(m_configs[CONFIG_CHARACTERS_PER_REALM] < 1 || m_configs[CONFIG_CHARACTERS_PER_REALM] > 10)
            {
    Index: src/game/World.h
    ===================================================================
    --- src/game/World.h        (revision 6497)
    +++ src/game/World.h        (working copy)
    @@ -84,6 +84,7 @@
            CONFIG_STRICT_PLAYER_NAMES,
            CONFIG_STRICT_CHARTER_NAMES,
            CONFIG_STRICT_PET_NAMES,
    +        CONFIG_CHARACTERS_PER_ACCOUNT,
            CONFIG_CHARACTERS_PER_REALM,
            CONFIG_SKIP_CINEMATICS,
            CONFIG_MAX_PLAYER_LEVEL,
    Index: src/mangosd/mangosd.conf.in
    ===================================================================
    --- src/mangosd/mangosd.conf.in        (revision 6497)
    +++ src/mangosd/mangosd.conf.in        (working copy)
    @@ -376,6 +376,11 @@
    #                                     (included in client by default, with active official localization or custom localization fonts in clientdir/Fonts).
    #                                 3 basic latin characters + server timezone specific
    #
    +#        CharactersPerAccount
    +#                Limit numbers of characters per account
    +#                Default: 50 (client limitation)
    +#                                The number must be between 1 and 50
    +#
    #        CharactersPerRealm
    #                Limit numbers of characters for account at realm
    #                Default: 10 (client limitation)
    @@ -493,6 +498,7 @@
    StrictPlayerNames = 0
    StrictCharterNames = 0
    StrictPetNames = 0
    +CharactersPerAccount = 50
    CharactersPerRealm = 10
    SkipCinematics = 0
    MaxPlayerLevel = 70

    Rev 2 with with the verification that the value CharactesPerAccount is higher than CharactersPerRealm.

    Index: src/game/CharacterHandler.cpp
    ===================================================================
    --- src/game/CharacterHandler.cpp        (revision 6497)
    +++ src/game/CharacterHandler.cpp        (working copy)
    @@ -223,6 +223,22 @@
                    return;
            }
    
    +        QueryResult *resultacct = LoginDatabase.PQuery("SELECT SUM(numchars) FROM realmcharacters WHERE acctid = '%d'", GetAccountId());
    +        uint8 acctcharcount = 0;
    +        if ( resultacct )
    +        {
    +                Field *fields=resultacct->Fetch();
    +                acctcharcount = fields[0].GetUInt8();
    +                delete resultacct;
    +
    +                if (acctcharcount >= sWorld.getConfig(CONFIG_CHARACTERS_PER_ACCOUNT))
    +                {
    +                        data << (uint8)CHAR_CREATE_ACCOUNT_LIMIT;
    +                        SendPacket( &data );
    +                        return;
    +                }
    +        }
    +
            QueryResult *result = CharacterDatabase.PQuery("SELECT COUNT(guid) FROM characters WHERE account = '%d'", GetAccountId());
            uint8 charcount = 0;
            if ( result )
    Index: src/game/World.cpp
    ===================================================================
    --- src/game/World.cpp        (revision 6497)
    +++ src/game/World.cpp        (working copy)
    @@ -463,6 +463,14 @@
            m_configs[CONFIG_STRICT_CHARTER_NAMES] = sConfig.GetIntDefault("StrictCharterNames", 0);
            m_configs[CONFIG_STRICT_PET_NAMES]         = sConfig.GetIntDefault("StrictPetNames",         0);
    
    +        m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = sConfig.GetIntDefault("CharactersPerAccount", 50);
    +        if(m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] < 1 || m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] > 50 && [CONFIG_CHARACTERS_PER_REALM] >= [CONFIG_CHARACTERS_PER_ACCOUNT])
    +        {
    +                sLog.outError("CharacterPerAccount (%i) must be in range 1..50. Set to 50.",m_configs[CONFIG_CHARACTERS_PER_ACCOUNT]);
    +                sLog.outError("CharacterPerAccount (%i) must be bigger than CharacterPerRealm.",m_configs[CONFIG_CHARACTERS_PER_ACCOUNT]);
    +                m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = 50;
    +        }
    +
            m_configs[CONFIG_CHARACTERS_PER_REALM] = sConfig.GetIntDefault("CharactersPerRealm", 10);
            if(m_configs[CONFIG_CHARACTERS_PER_REALM] < 1 || m_configs[CONFIG_CHARACTERS_PER_REALM] > 10)
            {
    Index: src/game/World.h
    ===================================================================
    --- src/game/World.h        (revision 6497)
    +++ src/game/World.h        (working copy)
    @@ -84,6 +84,7 @@
            CONFIG_STRICT_PLAYER_NAMES,
            CONFIG_STRICT_CHARTER_NAMES,
            CONFIG_STRICT_PET_NAMES,
    +        CONFIG_CHARACTERS_PER_ACCOUNT,
            CONFIG_CHARACTERS_PER_REALM,
            CONFIG_SKIP_CINEMATICS,
            CONFIG_MAX_PLAYER_LEVEL,
    Index: src/mangosd/mangosd.conf.in
    ===================================================================
    --- src/mangosd/mangosd.conf.in        (revision 6497)
    +++ src/mangosd/mangosd.conf.in        (working copy)
    @@ -376,6 +376,11 @@
    #                                     (included in client by default, with active official localization or custom localization fonts in clientdir/Fonts).
    #                                 3 basic latin characters + server timezone specific
    #
    +#        CharactersPerAccount
    +#                Limit numbers of characters per account
    +#                Default: 50 (client limitation)
    +#                                The number must be between 1 and 50
    +#
    #        CharactersPerRealm
    #                Limit numbers of characters for account at realm
    #                Default: 10 (client limitation)
    @@ -493,6 +498,7 @@
    StrictPlayerNames = 0
    StrictCharterNames = 0
    StrictPetNames = 0
    +CharactersPerAccount = 50
    CharactersPerRealm = 10
    SkipCinematics = 0
    MaxPlayerLevel = 70

    Sorry for my bad English I'm French.

    Sorry an Moderator can rename this topic to [Patch]Limiting Characters per Account? Thanks a lot.

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