Jump to content

FunkyBit

Members
  • Posts

    55
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by FunkyBit

  1. What bug does the patch fix? What features does the patch add?

    It is possible to summon players into instances that require a quest or key item but the player doesn't have that.

    For example you can summon players into karazhan that doen't have the key or the prequest done.

    This patch uses the areatrigger check for summoning effects and summoings fails if the char is not allowed to enter the instance the warlock is in.

    For which repository revision was the patch created?

    manogs-0.12

    no information about master, if needed working

    Who has been writing this patch? Please include either forum user names or email addresses.

    me

    Pastebin Link

    Maybe that is not the best solution. Is is plain code copy from areatrigger teleport code. But it works for almost a month (forgot to post it earlier >.<) and users are (un-)happy about it xD

  2. What bug does the patch fix?

    It fixes spawing of the buff objects in arenas that grant after 90 seconds of the match a buff that increases stealth detection. These objects didn't spwan anymore.

    For which repository revision was the patch created?

    For mangos-0.12 originally. As far as I checked the problem exists in master, too.

    Who has been writing this patch? Please include either forum user names or email addresses.

    Myself

    diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
    index bed382d..b98e9de 100644
    --- a/src/game/BattleGround.cpp
    +++ b/src/game/BattleGround.cpp
    @@ -53,6 +53,8 @@ BattleGround::BattleGround()
        m_LevelMax          = 0;
        m_InBGFreeSlotQueue = false;
        m_SetDeleteThis     = false;
    +
    +    m_ArenaBuffTimer    = 0;
    
        m_MaxPlayersPerTeam = 0;
        m_MaxPlayers        = 0;
    @@ -215,11 +236,11 @@ void BattleGround::Update(uint32 diff)
        if (isArena() && !m_ArenaBuffSpawned)
        {
            // 60 seconds after start the buffobjects in arena should get spawned
    -        if (m_StartTime > START_DELAY1 + ARENA_SPAWN_BUFF_OBJECTS)
    +        if (m_ArenaBuffTimer > START_DELAY1 + ARENA_SPAWN_BUFF_OBJECTS)
            {
                SpawnEvent(ARENA_BUFF_EVENT, 0, true);
                m_ArenaBuffSpawned = true;
    -        }
    +        } else m_ArenaBuffTimer += diff;
        }
    
        /*********************************************************/
    diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h
    index 5ee9041..502cf3a 100644
    --- a/src/game/BattleGround.h
    +++ b/src/game/BattleGround.h
    @@ -28,7 +28,7 @@
    #define BG_EVENT_DOOR 254
    // only arena event
    // cause this buff apears 90sec after start in every bg i implement it here
    -#define ARENA_BUFF_EVENT 252
    +#define ARENA_BUFF_EVENT 253
    
    
    class Creature;
    @@ -532,6 +532,7 @@ class BattleGround
            bool   m_InBGFreeSlotQueue;                         // used to make sure that BG is only once inserted into the BattleGroundMgr.BGFreeSlotQueue[bgTypeId] deque
            bool   m_SetDeleteThis;                             // used for safe deletion of the bg after end / all players leave
            bool   m_IsArena;
    +        uint32 m_ArenaBuffTimer;
            uint8  m_Winner;                                    // 0=alliance, 1=horde, 2=none
            int32  m_StartDelayTime;
            bool   m_IsRated;                                   // is this battle rated?
    

    Problem was that 'm_StartTime' is not increasing, it stays 0, and the if always results in false.

    The part about

    -#define ARENA_BUFF_EVENT 252

    +#define ARENA_BUFF_EVENT 253

    is optinal and not realy MaNGOS problem and only included because UDB and TBCDB use 253 as spawn event for these objects. Otherwise the database content must be changed in the relevant parts from 253 to 252 as event for these objects.

    pastebin link

    With best regards

    Funkybit

  3. What bug does the patch fix?

    SpellEffect 124 (PlayerPull) didn't pull players. It pushed them away like a knockback.

    For example this spell: Spell: Attract Magic

    For which repository revision was the patch created?

    MaNGOS-0.12, but same problem exists in Master. Code change is the same for both.

    Who has been writing this patch?

    me

    diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
    index 1e2272f..ebd10ba 100644
    --- a/src/game/SpellEffects.cpp
    +++ b/src/game/SpellEffects.cpp
    @@ -5628,7 +5880,7 @@ void Spell::EffectPlayerPull(uint32 i)
        if(!unitTarget)
            return;
    
    -    unitTarget->KnockBackFrom(m_caster,float(damage ? damage : unitTarget->GetDistance2d(m_caster)),float(m_spellInfo->EffectMiscValue[i])/10);
    +    unitTarget->KnockBackFrom(m_caster,-float(damage ? damage : unitTarget->GetDistance2d(m_caster)),float(m_spellInfo->EffectMiscValue[i])/10);
    }
    
    void Spell::EffectDispelMechanic(uint32 i)

  4. The problem isn't to get MaNGOS up and running on a Mac (it was a problem but with the tutorials here it worked in the ende).

    The problem is to integrate MaNGOS into Xcode.

    In the meantime I found out how to include the files into an Xcode project and even link the built button to the external makefile. But syntax highlighting and auto code completion is a mess. Xcode can hardly find anything to support you when coding -.-

  5. Hi all around!

    I switched a few weeks ago to Mac OS (I love it!).

    And now I try to use Xcode for MaNGOS/SD2 development... and I failed.

    There is no VC-project file, ok, understandable. So far makefile's work for me.

    But editing and working with the code in an "open with stupid editor without the benefits of an IDE" realy sucks... :(

    It would be absolutely satisfying if I could use Xcode just vor code develoment, auto code completition and all the other fancy things such an IDE can do, and compile/install (makefiles) on the bash (more would be greate of cause).

    But I just could reach the point where I could edit the code files in Xcode, but except the syntax highlighting there is nothing more working.

    I'm new to the Xcode and Mac stuff, I was used to Visual Studio, so it may be a beginner problem.

    But if anybody has some ideas about how to bring the MaNGOS code efficiently to the Xcode IDE would be greate!

    Thanks!!!

  6. Hey, I switched to Mac OS and I'm trying to set up MaNGOS...

    I followed the Guide (http://getmangos.eu/wiki/Compile_MaNGOS_On_Mac_OS_X) and I'am stuck at the "../configure..." part:

    Compile for the first time

    1. Create a directory to compile into:

    cd ~/source/mangos

    mkdir -p build

    cd build

    2. Compile:

    autoreconf -if ..

    ../configure --prefix=/usr/local --datadir=/usr/local/share --sysconfdir=/usr/local/etc --enable-cli --enable-ra LIBS="-lcrypto" CFLAGS="-O2" CXXFLAGS="-O2"

    The ../configure... outputs:

    checking for sqrt... yes

    checking for strchr... yes

    checking for strdup... yes

    checking for strerror... yes

    checking for strstr... yes

    configure: creating ./config.status

    .infig.status: error: cannot find input file:

    And the following make -j 2:

    make: *** No targets specified and no makefile found. Stop.

    And I just don't know any further... any idea or help?

  7. What bug does the patch fix? What features does the patch add?

    The patch adds core support for quests that give different reputation to characters of each faction. Till now each quest can only do up to 5 reputation changes to the completing characters but can not sense the faction the character belongs to.

    There are some quests in outland that give different reputation to characters of alliance and horde.

    For example: Wanted: Nazan's Riding Crop http://www.wowhead.com/?quest=11354

    And also all other daily quests you can do inside the hellfire citadel instances.

    For which repository revision was the patch created?

    This patch was created for mangos-0.12 branch, revision 8158.

    I don't use any 0.13 realm installation so don't ask for a master branch patch.

    Is there a thread in the bug report section or at lighthouse?

    Never seen one.

    Who has been writing this patch?

    only me

    diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
    index 652c103..d601454 100644
    --- a/src/game/ObjectMgr.cpp
    +++ b/src/game/ObjectMgr.cpp
    @@ -2815,17 +2815,17 @@ void ObjectMgr::LoadQuests()
            "RewChoiceItemCount1, RewChoiceItemCount2, RewChoiceItemCount3, RewChoiceItemCount4, RewChoiceItemCount5, RewChoiceItemCount6,"
        //   81          82          83          84          85             86             87             88
            "RewItemId1, RewItemId2, RewItemId3, RewItemId4, RewItemCount1, RewItemCount2, RewItemCount3, RewItemCount4,"
    -    //   89              90              91              92              93              94            95            96            97            98
    -        "RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5,"
    -    //   99                 100            101               102       103           104                105               106         107     108     109
    +    //   89              90              91              92              93              94                     95                  96            97            98            99            100           101                  102
    +        "RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepFactionAlliance, RewRepFactionHorde, RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5, RewRepValueAlliance, RewRepValueHorde, "
    +    //   103                104            105               106       107           108                109               110         111     112     113
            "RewHonorableKills, RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt,"
    -    //   110            111            112            113            114                 115                 116                 117
    +    //   114            115            116            117            118                 119                 120                 121
            "DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4,"
    -    //   118              119            120                121                122                123
    +    //   122              123            124                125                126                127
            "IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4,"
    -    //   124                     125                     126                     127
    +    //   128                     129                     130                     131
            "OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4,"
    -    //   128          129
    +    //   132          133
            "StartScript, CompleteScript"
            " FROM quest_template");
        if(result == NULL)
    @@ -3344,6 +3344,52 @@ void ObjectMgr::LoadQuests()
                }
            }
    
    +        if(qinfo->RewRepFactionAlliance)
    +        {
    +            if(!qinfo->RewRepValueAlliance)
    +            {
    +                sLog.outErrorDb("Quest %u has `RewRepFactionAlliance` = %u but `RewRepValueAlliance` = 0, quest will not reward this reputation.",
    +                    qinfo->GetQuestId(),qinfo->RewRepValueAlliance);
    +                // no changes
    +            }
    +
    +            if(!sFactionStore.LookupEntry(qinfo->RewRepFactionAlliance))
    +            {
    +                sLog.outErrorDb("Quest %u has `RewRepFactionAlliance` = %u but raw faction (faction.dbc) %u does not exist, quest will not reward reputation for this faction.",
    +                    qinfo->GetQuestId(),qinfo->RewRepFactionAlliance ,qinfo->RewRepFactionAlliance );
    +                qinfo->RewRepFactionAlliance = 0;            // quest will not reward this
    +            }
    +        }
    +        else if(qinfo->RewRepValueAlliance!=0)
    +        {
    +            sLog.outErrorDb("Quest %u has `RewRepFactionAlliance` = 0 but `RewRepValueAlliance` = %u.",
    +                qinfo->GetQuestId(),qinfo->RewRepValueAlliance);
    +            // no changes, quest ignore this data
    +        }
    +
    +        if(qinfo->RewRepFactionHorde)
    +        {
    +            if(!qinfo->RewRepValueHorde)
    +            {
    +                sLog.outErrorDb("Quest %u has `RewRepFactionHorde` = %u but `RewRepValueHorde` = 0, quest will not reward this reputation.",
    +                    qinfo->GetQuestId(),qinfo->RewRepValueHorde);
    +                // no changes
    +            }
    +
    +            if(!sFactionStore.LookupEntry(qinfo->RewRepFactionHorde))
    +            {
    +                sLog.outErrorDb("Quest %u has `RewRepFactionHorde` = %u but raw faction (faction.dbc) %u does not exist, quest will not reward reputation for this faction.",
    +                    qinfo->GetQuestId(),qinfo->RewRepFactionHorde ,qinfo->RewRepFactionHorde );
    +                qinfo->RewRepFactionHorde = 0;            // quest will not reward this
    +            }
    +        }
    +        else if(qinfo->RewRepValueHorde)
    +        {
    +            sLog.outErrorDb("Quest %u has `RewRepFactionHorde` = 0 but `RewRepValueHorde` = %u.",
    +                qinfo->GetQuestId(),qinfo->RewRepValueHorde);
    +            // no changes, quest ignore this data
    +        }
    +
            if(qinfo->RewSpell)
            {
                SpellEntry const* spellInfo = sSpellStore.LookupEntry(qinfo->RewSpell);
    diff --git a/src/game/Player.cpp b/src/game/Player.cpp
    index 1e796cb..86205b9 100644
    --- a/src/game/Player.cpp
    +++ b/src/game/Player.cpp
    @@ -5579,6 +5579,21 @@ void Player::RewardReputation(Quest const *pQuest)
            }
        }
    
    +    if(pQuest->RewRepFactionAlliance && GetTeam()==ALLIANCE && pQuest->RewRepValueAlliance)
    +    {
    +        int32 rep = CalculateReputationGain(GetQuestLevel(pQuest), pQuest->RewRepValueAlliance, pQuest->RewRepFactionAlliance, true);
    +        FactionEntry const* factionEntry = sFactionStore.LookupEntry(pQuest->RewRepFactionAlliance);
    +        if(factionEntry)
    +            GetReputationMgr().ModifyReputation(factionEntry, rep);
    +    }
    +    else if(pQuest->RewRepFactionHorde && GetTeam()==HORDE && pQuest->RewRepValueHorde)
    +    {
    +        int32 rep = CalculateReputationGain(GetQuestLevel(pQuest), pQuest->RewRepValueHorde, pQuest->RewRepFactionHorde, true);
    +        FactionEntry const* factionEntry = sFactionStore.LookupEntry(pQuest->RewRepFactionHorde);
    +        if(factionEntry)
    +            GetReputationMgr().ModifyReputation(factionEntry, rep);
    +    }
    +
        // TODO: implement reputation spillover
    }
    
    diff --git a/src/game/QuestDef.cpp b/src/game/QuestDef.cpp
    index 53f3381..d59d6a3 100644
    --- a/src/game/QuestDef.cpp
    +++ b/src/game/QuestDef.cpp
    @@ -98,38 +98,44 @@ Quest::Quest(Field * questRecord)
        for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
            RewRepFaction[i] = questRecord[89+i].GetUInt32();
    
    +    RewRepFactionAlliance = questRecord[94].GetUInt32();
    +    RewRepFactionHorde = questRecord[95].GetUInt32();
    +
        for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
    -        RewRepValue[i] = questRecord[94+i].GetInt32();
    -
    -    RewHonorableKills = questRecord[99].GetUInt32();
    -    RewOrReqMoney = questRecord[100].GetInt32();
    -    RewMoneyMaxLevel = questRecord[101].GetUInt32();
    -    RewSpell = questRecord[102].GetUInt32();
    -    RewSpellCast = questRecord[103].GetUInt32();
    -    RewMailTemplateId = questRecord[104].GetUInt32();
    -    RewMailDelaySecs = questRecord[105].GetUInt32();
    -    PointMapId = questRecord[106].GetUInt32();
    -    PointX = questRecord[107].GetFloat();
    -    PointY = questRecord[108].GetFloat();
    -    PointOpt = questRecord[109].GetUInt32();
    +        RewRepValue[i] = questRecord[96+i].GetInt32();
    +
    +    RewRepValueAlliance = questRecord[101].GetInt32();
    +    RewRepValueHorde = questRecord[102].GetInt32();
    +
    +    RewHonorableKills = questRecord[103].GetUInt32();
    +    RewOrReqMoney = questRecord[104].GetInt32();
    +    RewMoneyMaxLevel = questRecord[105].GetUInt32();
    +    RewSpell = questRecord[106].GetUInt32();
    +    RewSpellCast = questRecord[107].GetUInt32();
    +    RewMailTemplateId = questRecord[108].GetUInt32();
    +    RewMailDelaySecs = questRecord[109].GetUInt32();
    +    PointMapId = questRecord[110].GetUInt32();
    +    PointX = questRecord[111].GetFloat();
    +    PointY = questRecord[112].GetFloat();
    +    PointOpt = questRecord[113].GetUInt32();
    
        for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
    -        DetailsEmote[i] = questRecord[110+i].GetUInt32();
    +        DetailsEmote[i] = questRecord[114+i].GetUInt32();
    
        for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
    -        DetailsEmoteDelay[i] = questRecord[114+i].GetUInt32();
    +        DetailsEmoteDelay[i] = questRecord[118+i].GetUInt32();
    
    -    IncompleteEmote = questRecord[118].GetUInt32();
    -    CompleteEmote = questRecord[119].GetUInt32();
    +    IncompleteEmote = questRecord[122].GetUInt32();
    +    CompleteEmote = questRecord[123].GetUInt32();
    
        for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
    -        OfferRewardEmote[i] = questRecord[120+i].GetInt32();
    +        OfferRewardEmote[i] = questRecord[124+i].GetInt32();
    
        for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
    -        OfferRewardEmoteDelay[i] = questRecord[124+i].GetInt32();
    +        OfferRewardEmoteDelay[i] = questRecord[128+i].GetInt32();
    
    -    QuestStartScript = questRecord[128].GetUInt32();
    -    QuestCompleteScript = questRecord[129].GetUInt32();
    +    QuestStartScript = questRecord[132].GetUInt32();
    +    QuestCompleteScript = questRecord[133].GetUInt32();
    
        QuestFlags |= SpecialFlags << 16;
    
    diff --git a/src/game/QuestDef.h b/src/game/QuestDef.h
    index 7c77e5f..1ec2453 100644
    --- a/src/game/QuestDef.h
    +++ b/src/game/QuestDef.h
    @@ -239,6 +239,11 @@ class Quest
            uint32 OfferRewardEmote[QUEST_EMOTE_COUNT];
            uint32 OfferRewardEmoteDelay[QUEST_EMOTE_COUNT];
    
    +        uint32 RewRepFactionAlliance;
    +        uint32 RewRepFactionHorde;
    +        int32  RewRepValueAlliance;
    +        int32  RewRepValueHorde;
    +
            uint32 GetReqItemsCount() const { return m_reqitemscount; }
            uint32 GetReqCreatureOrGOcount() const { return m_reqCreatureOrGOcount; }
            uint32 GetRewChoiceItemsCount() const { return m_rewchoiceitemscount; }
    

    ALTER TABLE quest_template
     ADD COLUMN RewRepFactionAlliance smallint(5) unsigned NOT NULL default '0' COMMENT 'faction id from Faction.dbc in this case' AFTER RewRepFaction5,
     ADD COLUMN RewRepFactionHorde smallint(5) unsigned NOT NULL default '0' COMMENT 'faction id from Faction.dbc in this case' AFTER RewRepFactionAlliance,
     ADD COLUMN RewRepValueAlliance smallint(9) NOT NULL default '0' AFTER RewRepValue5,
     ADD COLUMN RewRepValueHorde smallint(9) NOT NULL default '0' AFTER RewRepValueAlliance;

    Patch code at pastebin: http://pastebin.com/f59b5cf82

    SQL query at pastebin: http://pastebin.com/f71e1dc1d

    If interested in already done db content:

    Heroic daily quests: http://pastebin.com/f156ec389

    Non-heroic daily quests: http://pastebin.com/f49daf4ea

    (this will, if accepted, also be posted at db developers forum)

    With best regards

    Funkybit

  8. GetSecurity() is not used to determine the security level of a character/account on login.

    It is just used to:

    - one in AuctionHouseMgr.cpp (don't know what it does there)

    - and to find out about the targets security level when applying GM commands; you can't use GM commands on a character that has a higher security level

    What you need to "manipulate" is the variable "AccountTypes _security;" (around line 640; Mangos-0.12) in WorldSession.h.

    This value and its getter "GetSecurity()" (around line 93 in WorldSession.h) holds your security level that has to be overwritten somewhere.

    I would guess you have to change the call of the constructor, defined in WorldSession.cpp (around line 41), but I have no idea where WorldSession objects are actually created.

    Edit:

    .....
       if(result)
       {   
           uint32 sec = (*result)[0].GetUInt32();
           delete result;
           if(sec > 0)
           {
               [b][i]return sec;[/i][/b]
           }
       }
    .....

    Maybe the second part of your code gets never adressed. If you RETURN "sec" you leave the complete code block and return to the caller. I guess every account has an entry in the accounts table, so you never get the chance to ask for an exception.

    Swap the two db access blocks around, then you ask first for the current realm and then for the generall case.

  9. Only if your are using UDB!

    There are NPCs and their related inventory for every season.

    NPC "XY" that sells S1 items has a copy of itself that sells S4 items.

    Other combinations also.

    These NPCs have mostly the correct items and their costs.

    You just need to despawn them and respawn their versions with the right inventory.

  10. Funny thing ^^

    I tested such a scenario in the first half of 2008.

    It worked pretty good...

    Item creation on one server leads to no problems on the other one.

    But I have to admit that there were no tests with the mail system... and I have no clue why item creation or more general operations on the item_instance table work without problems but mail doesn't.

    Our problem was - as you discribed - that chars could enter a fully spawend instance on the "raid realm", switch to the other on, walk the hole instance to the boss position, switch realm again and.. well skipped all the trashies.

    Thats why we dropped the scenario.

    BUT it just got to me ;)

    Again very dirty an VERY risky...

    Despawn all gobjects you can access the mail-system with.

    Auction-NPCs should also be despawned to be on the "safe side" ^^

    AND to avoid the enter instance/switch realm problem...

    Write a creature with EventAI that uses some spell like "Hand of Death" or any other STRONG instant kill spell and spawn your instances will with this creature (simply replace by one MySQL Query all mobs on any maps except 0,1,530 in the creature table with this mob - saves time)

    No one will switch realms anymore ;)

    And concerning the chat... well, in instance my for myself.. I turn any chat off to have my peace an fun. Trouble can be handled by your other GMs during that time, take a for yourself breake ;)

    And the community... they should search for players on the "level realm" and change whenever the group is ready. Don't see any problem with it just discipline.. not your problem ;)

    And as thread starter said I repeat again:

    That's all untested and very risky, YES, I think we know.

    Save the "good luck you fools"-posts for someone who realy deserves it.

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