Jump to content

blukkie

Members
  • Posts

    27
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by blukkie

  1. I'd like to disable, or limit it to around 3-5 people, the join as group function of battlegrounds.

    Now I've looked around in the code and I found that this is the function that handles the Join as Group button (correct me if I'm wrong):

     uint32 GetFreeSlotsForTeam(uint32 Team) const;

    So if I'd disable this, or alter its return value, would it make join as group stop functioning or would it also affect solo joining?

    Or would I have to alter:

    void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketId bracket_id, uint8 arenatype, bool isRated, uint32 arenaRating)

    Thanks in advance!

  2. Mangos Version: 0.12

    Custom Patches: none

    SD2 Version: 1697

    Database Name and Version : UDB 0.10.5 (365)

    How it SHOULD work: x

    How it DOES work: x

    I use commit 097eaa54a3b6117e8fe8.

    I have NO idea what is causing these crashs, and search did not clear anything either. Anyway, my server ONLY crashs with these logs as a result and it happens ALOT. Is there any fix to this, or is it a known bug/crash? This has been happening on many commits for now.

    Revision: * * 8569 *
    Date 9:6:2010. Time 15:45 
    //=====================================================
    *** Hardware ***
    Processor: Intel(R) Xeon(R) CPU           X3430  @ 2.40GHz
    Number Of Processors: 4
    Physical Memory: 4184960 KB (Available: 1988852 KB)
    Commit Charge Limit: 4194303 KB
    
    *** Operation System ***
    Microsoft Windows Server 2003 Standard Edition Service Pack 2 (Version 5.2, Build 3790)
    
    //=====================================================
    Exception code: C0000005 ACCESS_VIOLATION
    Fault address:  0046D284 01:0006C284 C:\\Documents and Settings\\admin\\Desktop\\mangos-mangos-v0.12-1661-g097eaa5\\Q-GAMING\\mangosd.exe
    
    Registers:
    EAX:27202C27
    EBX:F871C860
    ECX:C9A3F300
    EDX:C9A3F340
    ESI:00000000
    EDI:00857670
    CS:EIP:0023:0046D284
    SS:ESP:002B:0A807468  EBP:0A807474
    DS:002B  ES:002B  FS:0053  GS:002B
    Flags:00010206
    
    Call stack:
    Address   Frame     Function      SourceFile
    0046D284  00000000  Item::GetBagSlot+24
    0053A756  00000000  Player::_SaveInventory+216
    00539CF2  00000000  Player::SaveToDB+1102
    00504595  00000000  Player::Update+A65
    004DB59B  00000000  Map::Update+DB
    00667538  00000000  MapManager::Update+128
    006129A2  00000000  World::Update+752
    004542BE  00000000  WorldRunnable::run+8E
    00857689  00000000  ACE_Based::Thread::ThreadTask+19
    012414D4  00000000  __WSAFDIsSet+FFFFFFFFFFFCC45C
    78543433  00000000  _endthreadex+44
    785434C7  00000000  _endthreadex+D8
    7D4DFE21  00000000  FlsSetValue+136
    
    Call stack:
    Address   Frame     Function      SourceFile
    7D61C828  00000000  ZwWaitForSingleObject+15
    7D4D8BF1  00000000  WaitForSingleObject+12
    011F9C64  00000000  __WSAFDIsSet+FFFFFFFFFFF84BEC
    012664DA  00000000  __WSAFDIsSet+FFFFFFFFFFFF1462
    0126269F  00000000  __WSAFDIsSet+FFFFFFFFFFFED627
    00635F4A  00000000  WorldSocketMgr::Wait+4A
    F87FA704  FFFFFFFF  0000:00000000 
    F87FA704  FFFFFFFF  0000:00000000 
    6C696146  00000000  

  3. I'll bump this, I'm having the same problem.

    Revision: * * 8569 *
    Date 9:6:2010. Time 9:26 
    //=====================================================
    *** Hardware ***
    Processor: Intel(R) Xeon(R) CPU           X3430  @ 2.40GHz
    Number Of Processors: 4
    Physical Memory: 4184960 KB (Available: 2437224 KB)
    Commit Charge Limit: 4194303 KB
    
    *** Operation System ***
    Microsoft Windows Server 2003 Standard Edition Service Pack 2 (Version 5.2, Build 3790)
    
    //=====================================================
    Exception code: C0000005 ACCESS_VIOLATION
    Fault address:  00606FE6 01:00205FE6 C:\\Documents and Settings\\admin\\Desktop\\QG\\Q-GAMING\\mangosd.exe
    
    Registers:
    EAX:00000000
    EBX:F87204C8
    ECX:EE86D6C0
    EDX:DBA46080
    ESI:00000000
    EDI:008556B0
    CS:EIP:0023:00606FE6
    SS:ESP:002B:0A823628  EBP:0A82B92C
    DS:002B  ES:002B  FS:0053  GS:002B
    Flags:00010246
    
    Call stack:
    Address   Frame     Function      SourceFile
    00606FE6  00000000  WorldSession::LogoutPlayer+B96
    007D68FA  00000000  WorldSession::HandleMoveWorldportAckOpcode+19A
    007D674F  00000000  WorldSession::HandleMoveWorldportAckOpcode+5F
    00605DAD  00000000  WorldSession::Update+2BD
    00613DC3  00000000  World::UpdateSessions+C3
    00612158  00000000  World::Update+338
    00453E0E  00000000  WorldRunnable::run+8E
    008556C9  00000000  ACE_Based::Thread::ThreadTask+19
    012414D4  00000000  __WSAFDIsSet+FFFFFFFFFFFCC45C
    78543433  00000000  _endthreadex+44
    785434C7  00000000  _endthreadex+D8
    7D4DFE21  00000000  FlsSetValue+136
    
    Call stack:
    Address   Frame     Function      SourceFile
    7D61C828  00000000  ZwWaitForSingleObject+15
    7D4D8BF1  00000000  WaitForSingleObject+12
    011F9C64  00000000  __WSAFDIsSet+FFFFFFFFFFF84BEC
    012664DA  00000000  __WSAFDIsSet+FFFFFFFFFFFF1462
    0126269F  00000000  __WSAFDIsSet+FFFFFFFFFFFED627
    0063584A  00000000  WorldSocketMgr::Wait+4A
    F8745BC4  FFFFFFFF  0000:00000000 
    F8745BC4  FFFFFFFF  0000:00000000 
    6C696146  00000000  

  4. I'm trying to do a few checks with a std::list, but it's crashy at the moment and I don't know why.

    There is this sequence where Units from a wave of mobs get spawned, when they get spawned they are inserted in the std::list like this:

    for (int i = 0; i < 3; ++i)
    {
       wave_spawn = m_creature->SummonCreature(wave_one[i], x[i], y[i], z[i], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
       l_wave.push_back(wave_spawn);
    }

    The same script will then check if mobs in this wave are dead. If so, it will increase Count. When Count reaches a specific number it will clear the list in order for the next wave of mobs to enter the list.

    {
       uint8 count = 0;
       for(std::list<Unit*>::iterator iter = l_wave.begin(); iter != l_wave.end(); ++iter)
       {
           if (!(*iter))
               continue;
    
           m_spawn = Unit::GetUnit((*m_creature), (*iter)->GetGUID());
    
           if (!m_spawn)
               continue;
    
           if(!m_spawn->isAlive())
               count++;
       }
    
       if (count == 3 && wave_timer > 15000)
       {
           l_wave.clear();
           wave_timer = 15000;
       }
    }break;

    The thing is though, everytime I kill a mob in one of these waves, the server crashs. The crashlog redirects me to the 'isAlive()' part, and I can't figure out WHY it is crashing it, cause afaik I did it in a safe way, checking if the iteration exists before using it.

    Anyone that can enlighten me what I'm doing wrong?

  5. rev 8569

    Machine: Intel Xeon X3430

    OS: Windows 2003 server

    RAM: 4GB

    Microsoft Visual C++ 2008 express edition

    Revision: * * 8569 *
    Date 20:5:2010. Time 15:32 
    //=====================================================
    *** Hardware ***
    Processor: Intel(R) Xeon(R) CPU           X3430  @ 2.40GHz
    Number Of Processors: 4
    Physical Memory: 4184960 KB (Available: 2800060 KB)
    Commit Charge Limit: 4194303 KB
    
    *** Operation System ***
    Microsoft Windows Server 2003 Standard Edition Service Pack 2 (Version 5.2, Build 3790)
    
    //=====================================================
    Exception code: C00000FD STACK_OVERFLOW
    Fault address:  0042EFC7 01:0002DFC7 C:\\Documents and Settings\\admin\\Desktop\\SERVER\\mangosd.exe
    
    Registers:
    EAX:09232000
    EBX:F856E228
    ECX:09232FCC
    EDX:0923B06C
    ESI:00000000
    EDI:0080BA60
    CS:EIP:0023:0042EFC7
    SS:ESP:002B:0923B048  EBP:0923B05C
    DS:002B  ES:002B  FS:0053  GS:002B
    Flags:00010206
    
    Call stack:
    Address   Frame     Function      SourceFile
    0042EFC7  00000000  _chkstk+27
    004B4CF9  00000000  Map::GetGrid+59
    004B4F3F  00000000  Map::GetAreaFlag+1F
    004369FF  00000000  WorldObject::GetZoneAndAreaId+5F
    0069F3EC  00000000  Spell::CheckCast+ACC
    00698D3E  00000000  Spell::Prepare+1BE
    00458D15  00000000  Unit::CastSpell+1B5
    00458B58  00000000  Unit::CastSpell+118
    00469E4B  00000000  Unit::HandleProcTriggerSpell+1B1B
    0047708F  00000000  Unit::ProcDamageAndSpellFor+3AF
    0046515B  00000000  Unit::ProcDamageAndSpell+22B
    0045A3F9  00000000  Unit::SpellNonMeleeDamageLog+329
    007BAEC8  00000000  Spell::EffectSchoolDMG+18A8
    0069E61C  00000000  Spell::HandleEffects+10C
    006943F9  00000000  Spell::DoSpellHitOnUnit+5F9
    00693BCB  00000000  Spell::DoAllEffectOnTarget+17B
    0069ABEB  00000000  Spell::handle_immediate+AB
    0069A058  00000000  Spell::cast+E58
    00698E62  00000000  Spell::Prepare+2E2
    00458D15  00000000  Unit::CastSpell+1B5
    00458B58  00000000  Unit::CastSpell+118
    00469E4B  00000000  Unit::HandleProcTriggerSpell+1B1B
    0047708F  00000000  Unit::ProcDamageAndSpellFor+3AF
    0046515B  00000000  Unit::ProcDamageAndSpell+22B
    0045A3F9  00000000  Unit::SpellNonMeleeDamageLog+329
    007BAEC8  00000000  Spell::EffectSchoolDMG+18A8
    0069E61C  00000000  Spell::HandleEffects+10C
    006943F9  00000000  Spell::DoSpellHitOnUnit+5F9
    00693BCB  00000000  Spell::DoAllEffectOnTarget+17B
    0069ABEB  00000000  Spell::handle_immediate+AB
    0069A058  00000000  Spell::cast+E58
    00698E62  00000000  Spell::Prepare+2E2
    00458D15  00000000  Unit::CastSpell+1B5
    00458B58  00000000  Unit::CastSpell+118
    00469E4B  00000000  Unit::HandleProcTriggerSpell+1B1B
    0047708F  00000000  Unit::ProcDamageAndSpellFor+3AF
    0046515B  00000000  Unit::ProcDamageAndSpell+22B
    0045A3F9  00000000  Unit::SpellNonMeleeDamageLog+329
    007BAEC8  00000000  Spell::EffectSchoolDMG+18A8
    0069E61C  00000000  Spell::HandleEffects+10C
    006943F9  00000000  Spell::DoSpellHitOnUnit+5F9
    00693BCB  00000000  Spell::DoAllEffectOnTarget+17B
    0069ABEB  00000000  Spell::handle_immediate+AB
    0069A058  00000000  Spell::cast+E58
    00698E62  00000000  Spell::Prepare+2E2
    00458D15  00000000  Unit::CastSpell+1B5
    00458B58  00000000  Unit::CastSpell+118
    00469E4B  00000000  Unit::HandleProcTriggerSpell+1B1B
    0047708F  00000000  Unit::ProcDamageAndSpellFor+3AF
    0046515B  00000000  Unit::ProcDamageAndSpell+22B
    0045A3F9  00000000  Unit::SpellNonMeleeDamageLog+329
    007BAEC8  00000000  Spell::EffectSchoolDMG+18A8
    0069E61C  00000000  Spell::HandleEffects+10C
    006943F9  00000000  Spell::DoSpellHitOnUnit+5F9
    00693BCB  00000000  Spell::DoAllEffectOnTarget+17B
    0069ABEB  00000000  Spell::handle_immediate+AB
    0069A058  00000000  Spell::cast+E58
    00698E62  00000000  Spell::Prepare+2E2
    00458D15  00000000  Unit::CastSpell+1B5
    00458B58  00000000  Unit::CastSpell+118
    00469E4B  00000000  Unit::HandleProcTriggerSpell+1B1B
    0047708F  00000000  Unit::ProcDamageAndSpellFor+3AF
    0046515B  00000000  Unit::ProcDamageAndSpell+22B
    0045A3F9  00000000  Unit::SpellNonMeleeDamageLog+329
    007BAEC8  00000000  Spell::EffectSchoolDMG+18A8
    0069E61C  00000000  Spell::HandleEffects+10C
    006943F9  00000000  Spell::DoSpellHitOnUnit+5F9
    00693BCB  00000000  Spell::DoAllEffectOnTarget+17B
    0069ABEB  00000000  Spell::handle_immediate+AB
    0069A058  00000000  Spell::cast+E58
    0069B480  00000000  Spell::update+290
    006A593D  00000000  SpellEvent::Execute+2D
    0086424C  00000000  EventProcessor::Update+EC
    00455DB8  00000000  Unit::Update+28
    004D0ABF  00000000  Player::Update+DF
    004B2079  00000000  Map::Update+D9
    006260B8  00000000  MapManager::Update+128
    005E584B  00000000  World::Update+77B
    0042ECEE  00000000  WorldRunnable::run+8E
    0080BA79  00000000  ACE_Based::Thread::ThreadTask+19
    00B814D4  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
    78543433  00000000  _endthreadex+44
    785434C7  00000000  _endthreadex+D8
    7D4DFE21  00000000  FlsSetValue+136
    
    Call stack:
    Address   Frame     Function      SourceFile
    7D61C828  00000000  ZwWaitForSingleObject+15
    7D4D8BF1  00000000  WaitForSingleObject+12
    
    Call stack:
    Address   Frame     Function      SourceFile
    7D61D051  00000000  NtWaitForMultipleObjects+15
    7D63F988  00000000  RtlSetEnvironmentStrings+9A8
    7D4DFE21  00000000  FlsSetValue+136
    
    Call stack:
    Address   Frame     Function      SourceFile
    7D61CCA8  00000000  ZwDelayExecution+15
    7D4D14EF  00000000  Sleep+F
    0080BC90  00000000  ACE_Based::Thread::Sleep+30
    00811EA0  00000000  SqlDelayThread::run+20
    0080BA79  00000000  ACE_Based::Thread::ThreadTask+19
    00B814D4  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
    78543433  00000000  _endthreadex+44
    785434C7  00000000  _endthreadex+D8
    7D4DFE21  00000000  FlsSetValue+136
    
    Call stack:
    Address   Frame     Function      SourceFile
    7D61CCA8  00000000  ZwDelayExecution+15
    7D4D14EF  00000000  Sleep+F
    0080BC90  00000000  ACE_Based::Thread::Sleep+30
    00811EA0  00000000  SqlDelayThread::run+20
    0080BA79  00000000  ACE_Based::Thread::ThreadTask+19
    00B814D4  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
    78543433  00000000  _endthreadex+44
    785434C7  00000000  _endthreadex+D8
    7D4DFE21  00000000  FlsSetValue+136
    
    Call stack:
    Address   Frame     Function      SourceFile
    7D61CCA8  00000000  ZwDelayExecution+15
    7D4D14EF  00000000  Sleep+F
    0080BC90  00000000  ACE_Based::Thread::Sleep+30
    00811EA0  00000000  SqlDelayThread::run+20
    0080BA79  00000000  ACE_Based::Thread::ThreadTask+19
    00B814D4  00000000  ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74
    78543433  00000000  _endthreadex+44
    785434C7  00000000  _endthreadex+D8
    7D4DFE21  00000000  FlsSetValue+136
    
    Call stack:
    Address   Frame     Function      SourceFile
    7D61D6C6  00000000  ZwGetContextThread+12
    0923A06C  00000000  0000:00000000 
    FF50D845  FFFFFFFF  

    Looks like some position on the world bugs out. When I reset all player's positions before login (after a crash) the crash does not occur anymore untill somebody goes to that specific spot again (which I haven't figure out yet). So when I do not relocate players, this crash will keep on rolling untill I relocate everyone.

  6. I'm scripting a NPC that hands out titles, but when I try to look up the entry of a title with

    const CharTitlesEntry* titleInfo = sCharTitlesStore.LookUpEntry(id);

    I get Unresolved External Symbol errors. CharTitleStore apparently isn't supported by CreatureAI scripts. Now I'm trying to figure out how to make it supported, but the only thing I can come up with is adding a line at DBCStores.h -- however, I do not know what to put here.

    I'm talking about this part of DBCStores.h

    // script support functions
    MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry>          const* GetSoundEntriesStore();
    MANGOS_DLL_SPEC DBCStorage <SpellEntry>                 const* GetSpellStore();
    MANGOS_DLL_SPEC DBCStorage <SpellRangeEntry>            const* GetSpellRangeStore();
    MANGOS_DLL_SPEC DBCStorage <FactionEntry>               const* GetFactionStore();
    MANGOS_DLL_SPEC DBCStorage <ItemEntry>                  const* GetItemDisplayStore();
    MANGOS_DLL_SPEC DBCStorage <CreatureDisplayInfoEntry>   const* GetCreatureDisplayStore();
    MANGOS_DLL_SPEC DBCStorage <EmotesEntry>                const* GetEmotesStore();
    MANGOS_DLL_SPEC DBCStorage <EmotesTextEntry>            const* GetEmotesTextStore();
    #endif

    Now there is a line above, stating

    extern DBCStorage <CharTitlesEntry>              sCharTitlesStore;

    And that is what I tried to access with my script.

    The only function I found, for titles, is GetTitleId() and it's not what I need, or I am using it wrong.

    So, what's a solution to this problem? How can I add the CharTitleStore to CreatureAI?

    Thanks in advance.

  7. why don't you just use this function ?

    pPlayer->UpdateSkillsToMaxSkillsForLevel();

    The issue of skillupgrading has been fixed, but I have a similar problem which I posted earlier.

    Not sure if I have to start another thread, as it's basicly the same problem.

  8. I'm getting the same errors with

    const CharTitlesEntry* titleInfo = sCharTitlesStore.LookUpEntry(id);

    now, and I have no idea how to fix it with modifying the core. I tried to do something similair to what Patman128 said, but that did not quite work out.

  9. I want to announce things worldwide with the SendWorldText function, but I get Unresolved External Symbol errors when using the function

    char msg[200];
    snprintf(msg, 200, "%s blabla test", m_creature->GetName());
    sWorld.SendWorldText(LANG_SYSTEMMESSAGE, msg);

    Now I've run into problems like these more often and I'd like to know, is there a way to add these functions to the CreatureAI?

    I've tried a couple of things trying to fix this, but I haven't found a way.

    Thanks in advance.

  10. Is there any way you can add GameObjects with a CreatureAI Script?

    I couldn't find any function that allows me to do this, so I tried this, but it's illegal.

    float x = target->GetPositionX();
    float y = target->GetPositionY();
    float z = target->GetPositionZ();
    Map* m = target->GetMap();
    
    GameObject* pFire = new GameObject;
    if (pFire->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), 177704, m, x, y, z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 20000, GO_STATE_READY))
    {
       target->AddGameObject(pFire);
       m->Add(pFire);
    }

    Thanks in advance.

  11. Look in mangosd.conf

    # AlwaysMaxSkillForLevel

    # Players will automatically gain max level dependent (weapon/defense) skill when logging in, leveling up etc.

    # Default: 0 (false)

    # 1 (true)

    This was mainly for developing, scripting learning purpose. But thanks :)

    @Patman128

    Will look into that! Cheers!

  12. So I was thinking of making a NPC that would raise all your skills, except for your profession ones, to their maximum level.

    Now there are no errors except for when the whole process is done. The following errors appear:

    1>   Creating library ..\\..\\..\\..\\bin\\win32_release/MaNGOSScript.lib and object ..\\..\\..\\..\\bin\\win32_release/MaNGOSScript.exp
    
    1>weaponmaster_ai.obj : error LNK2001: unresolved external symbol "class DBCStorage<struct SkillLineEntry> sSkillLineStore" (?sSkillLineStore@@3V?$DBCStorage@USkillLineEntry@@@@A)
    
    1>..\\..\\..\\..\\bin\\win32_release/MaNGOSScript.dll : fatal error LNK1120: 1 unresolved externals

    And here is the full script:

    // WEAPON MASTER
    
    #include "precompiled.h"
    #include "sharedDefines.h"
    #include <cstring>
    
    #define     GOSSIP_ITEM_1       "Maximize my skills, please."
    
    bool WeaponMasterHello(Player* pPlayer, Creature* pCreature)
    {
       pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF, "", 0, true);
    
       pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
       return true;
    }
    
    
    bool WeaponMasterSkill(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction, const char* sCode)
    {
       if (uiSender == GOSSIP_SENDER_MAIN)
       {
           //SkillLineEntry const *targetSkillInfo = NULL;
           switch (uiAction)
           {
               case GOSSIP_ACTION_INFO_DEF:
               {
                   for (uint32 i = 1; i < sSkillLineStore.GetNumRows(); ++i)
                   {
                       SkillLineEntry const *skillInfo = NULL;
                       skillInfo = sSkillLineStore.LookupEntry(i);
    
                       if (!skillInfo)
                           continue;
    
                       if (skillInfo->categoryId == SKILL_CATEGORY_PROFESSION || 
                           skillInfo->categoryId == SKILL_CATEGORY_SECONDARY)
                           continue;
    
                       uint16 maxLevel = pPlayer->GetPureMaxSkillValue(skillInfo->id);
                       pPlayer->SetSkill(skillInfo->id, maxLevel, maxLevel);
                   }
    
                   return true;
               }
           }
       }
    
       return false;
    }
    
    void AddSC_Weaponmaster_AI()
    {
       Script* newscript;
    
       newscript = new Script;
       newscript->Name = "weaponmaster_ai";
       newscript->pGossipHello = &WeaponMasterHello;
       newscript->pGossipSelectWithCode = &WeaponMasterSkill;
       newscript->RegisterSelf();
    }

    So what is wrong with the script? Did I forget some header(s)? Is there another way?

    Thanks in advance :)

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