Jump to content

yad02

Members
  • Posts

    149
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by yad02

  1. Compile fix for 8190+

    Maybe new void KilledMonster( CreatureInfo const* cInfo, uint64 guid ); could be used...

    --------------------------- src/game/OutdoorPvP.cpp ---------------------------
    index c43cf89..51d09ce 100644
    @@ -582,7 +582,7 @@ void OutdoorPvPObjective::SendObjectiveComplete(uint32 id,uint64 guid)
            Player * plr = objmgr.GetPlayer(*itr);
            if(plr && plr->GetTeam() == controlling_faction)
            {
    -            plr->KilledMonster(id,guid);
    +            plr->KilledMonsterCredit(id,guid);
            }
        }
    }
    
    -------------------------- src/game/OutdoorPvPNA.cpp --------------------------
    index c0456c1..65105c6 100644
    @@ -32,7 +32,7 @@ void OutdoorPvPNA::HandleKillImpl(Player *plr, Unit * killed)
    {
        if(killed->GetTypeId() == TYPEID_PLAYER && plr->GetTeam() != ((Player*)killed)->GetTeam())
        {
    -        plr->KilledMonster(NA_CREDIT_MARKER,0); // 0 guid, btw it isn't even used in killedmonster function 
    +        plr->KilledMonsterCredit(NA_CREDIT_MARKER,0); // 0 guid, btw it isn't even used in killedmonster function 
            if(plr->GetTeam() == ALLIANCE)
                plr->CastSpell(plr,NA_KILL_TOKEN_ALLIANCE,true);
            else
    
    -------------------------- src/game/OutdoorPvPSI.cpp --------------------------
    index 4c7ae9f..7afb9f7 100644
    @@ -150,7 +150,7 @@ bool OutdoorPvPSI::HandleAreaTrigger(Player *plr, uint32 trigger)
                    // add 20 cenarion circle repus
                    plr->GetReputationMgr().ModifyReputation(sFactionStore.LookupEntry(609), 20);
                    // complete quest
    -                plr->KilledMonster(SI_TURNIN_QUEST_CM_A,0);
    +                plr->KilledMonsterCredit(SI_TURNIN_QUEST_CM_A,0);
                }
                return true;
            case SI_AREATRIGGER_H:
    @@ -176,7 +176,7 @@ bool OutdoorPvPSI::HandleAreaTrigger(Player *plr, uint32 trigger)
                    plr->GetReputationMgr().ModifyReputation(sFactionStore.LookupEntry(609), 20);
    
                    // complete quest
    -                plr->KilledMonster(SI_TURNIN_QUEST_CM_H,0);
    +                plr->KilledMonsterCredit(SI_TURNIN_QUEST_CM_H,0);
                }
                return true;
        }
    

  2. Does this patch work again for you (since 8102) ?

    Maybe a problem with 8102 but I don't see where...

    This code could be a little part for 8102+ support

    @@ -324,11 +324,10 @@ bool OutdoorPvPObjective::DelCreature(uint32 type)
        sLog.outDebug("deleting opvp creature type %u",type);
        uint32 guid = cr->GetDBTableGUIDLow();
        // dont save respawn time
        cr->SetRespawnTime(0);
        cr->RemoveCorpse();
    -    cr->CleanupsBeforeDelete();
        // explicit removal from map
        // beats me why this is needed, but with the recent removal "cleanup" some creatures stay in the map if "properly" deleted
        // so this is a big fat workaround, if AddObjectToRemoveList and DoDelayedMovesAndRemoves worked correctly, this wouldn't be needed
        if(Map * map = MapManager::Instance().FindMap(cr->GetMapId()))
            map->Remove(cr,false);
    
    

  3. @@ -6300,11 +6310,11 @@ void Player::CheckDuelDistance(time_t currTime)
        }
    }
    
    bool Player::IsOutdoorPvPActive()
    {
    -    return (isAlive() && !HasInvisibilityAura() && !HasStealthAura() && (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP) || sWorld.IsPvPRealm())  && !HasUnitMovementFlag(MOVEMENTFLAG_FLYING2) && !isInFlight());
    +    return (isAlive() && !HasInvisibilityAura() && !HasStealthAura() && (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP) || sWorld.IsPvPRealm())  && !m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FLYING2) && !isInFlight());
    }
    
    void Player::DuelComplete(DuelCompleteType type)
    {
        // duel not requested
    

    Little fix for 8077+

  4. A lot of error

    2>------ Début de la génération*: Projet*: game, Configuration*: Release Win32 ------
    2>Compilation en cours...
    2>PlayerbotShamanAI.cpp
    2>PlayerbotAI.cpp
    2>..\\..\\src\\game\\PlayerbotShamanAI.cpp(96) : error C2039: 'Follow'*: n'est pas membre de 'PlayerbotAI'
    2>        u:\\svn\\mangos-patchs\\src\\game\\PlayerbotAI.h(16)*: voir la déclaration de 'PlayerbotAI'
    2>Player.cpp
    2>..\\..\\src\\game\\PlayerbotAI.cpp(808) : error C2039: 'AddUnitMovementFlag'*: n'est pas membre de 'Player'
    2>        u:\\svn\\mangos-patchs\\src\\game\\Player.h(905)*: voir la déclaration de 'Player'
    2>..\\..\\src\\game\\PlayerbotAI.cpp(820) : error C2039: 'RemoveUnitMovementFlag'*: n'est pas membre de 'Player'
    2>        u:\\svn\\mangos-patchs\\src\\game\\Player.h(905)*: voir la déclaration de 'Player'
    2>..\\..\\src\\game\\PlayerbotAI.cpp(1954) : error C2039: 'x'*: n'est pas membre de 'WorldLocation'
    2>        u:\\svn\\mangos-patchs\\src\\game\\Object.h(100)*: voir la déclaration de 'WorldLocation'
    2>..\\..\\src\\game\\PlayerbotAI.cpp(1954) : error C2039: 'y'*: n'est pas membre de 'WorldLocation'
    2>        u:\\svn\\mangos-patchs\\src\\game\\Object.h(100)*: voir la déclaration de 'WorldLocation'
    2>..\\..\\src\\game\\PlayerbotAI.cpp(1954) : error C2039: 'z'*: n'est pas membre de 'WorldLocation'
    2>        u:\\svn\\mangos-patchs\\src\\game\\Object.h(100)*: voir la déclaration de 'WorldLocation'
    2>..\\..\\src\\game\\Player.cpp(6339) : error C3861: 'HasUnitMovementFlag'*: identificateur introuvable
    

    Sorry for french output log...

    please fix all these errors with right way, maybe you are some error with your latest merge ?

    @Runsttren

    can you replace your "tab" by 4 spaces please ?

  5.        sSocialMgr.RemovePlayerSocial (_player->GetGUIDLow ());
    
           ///- Remove the player from the world
           // the player may not be in the world when logging out
           // e.g if he got disconnected during a transfer to another map
           // calls to GetMap in this case may cause crashes
           if(_player->IsInWorld()) _player->GetMap()->Remove(_player, false);
           // RemoveFromWorld does cleanup that requires the player to be in the accessor
           ObjectAccessor::Instance().RemoveObject(_player);
    
           ///- Delete the player object
           _player->CleanupsBeforeDelete();                    // do some cleanup before deleting to prevent crash at crossreferences to already deleted data
    
           sSocialMgr.RemovePlayerSocial (_player->GetGUIDLow ());
    
           uint32 guid = _player->GetGUIDLow();
    
           delete _player;
           _player = NULL;
    

    This code doesn't seam clean

    sSocialMgr.RemovePlayerSocial (_player->GetGUIDLow ()); appears 2 times

    and uint32 guid = _player->GetGUIDLow(); should be used in sSocialMgr.RemovePlayerSocial (_player->GetGUIDLow ());

    Can you explain it ?

  6. I don't know where the check is to let you cast it, but there's a check in Player.cpp that checks when you enter a new zone if you're on a flying mount and dismounts you if you're not allowed to... (UpdateZoneDependentAuras)

        if( !IsAllowUseFlyMountsHere() )
       {
           RemoveSpellsCausingAura(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED);
           RemoveSpellsCausingAura(SPELL_AURA_FLY);
       }

    Also, I think there's something on the SD2 forums about this..

    This code just remove aura in case you are teleported etc...

  7. Thank you, but I'm sorry, I just give you this code (many things are hardcode but some things can be usefull).

    I haven't github account and I don't use it for my others projects.

    I follow your project and I adandon "my mine" (I cannot be everywhere, I haven't many time to do all)

  8. I have some questions :

    Does non enUS dbc are supported (for spell) ?

    bool PlayerbotAI::IsInCombat() {
       bool inCombat = false;
       inCombat |= m_bot->isInCombat();
       inCombat |= m_master->isInCombat();
       if( m_bot->GetGroup() ) {
           GroupReference *ref = m_bot->GetGroup()->GetFirstMember();
           while( ref ) {
               inCombat |= ref->getSource()->isInCombat();
               ref = ref->next();
           }
       }
       return inCombat;
    }
    

    Does not better to verify if attackers list is empty (and get first attacker) ?

    Can you replace tab char by four space and remove "() {" in fonction (to respect a little mangos standard) ? (just suggestion)

  9. Just a typo

    I'm not sure but "proffesion" word does not exist

    In all code word "profession" is used, for example : "IsPrimaryProfessionFirstRankSpell".

    --------------------------- src/game/NPCHandler.cpp ---------------------------
    index e15fa20..e3e4cb4 100644
    @@ -155,7 +155,7 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
    
        // reputation discount
        float fDiscountMod = _player->GetReputationPriceDiscount(unit);
    -    bool can_learn_primary_prof = GetPlayer()->GetFreePrimaryProffesionPoints() > 0;
    +    bool can_learn_primary_prof = GetPlayer()->GetFreePrimaryProfessionPoints() > 0;
    
        uint32 count = 0;
        for(TrainerSpellMap::const_iterator itr = trainer_spells->spellList.begin(); itr != trainer_spells->spellList.end(); ++itr)
    
    ----------------------------- src/game/Player.cpp -----------------------------
    index e56a90f..23f797a 100644
    @@ -660,7 +660,7 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8
        InitTaxiNodesForLevel();
        InitGlyphsForLevel();
        InitTalentForLevel();
    -    InitPrimaryProffesions();                               // to max set before any spell added
    +    InitPrimaryProfessions();                               // to max set before any spell added
    
        // apply original stats mods before spell loading or item equipment that call before equip _RemoveStatsMods()
        UpdateMaxHealth();                                      // Update max Health (for add bonus from stamina)
    @@ -3727,10 +3727,10 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
        m_usedTalentCount += talentCost;
    
        // update free primary prof.points (if any, can be none in case GM .learn prof. learning)
    -    if(uint32 freeProfs = GetFreePrimaryProffesionPoints())
    +    if(uint32 freeProfs = GetFreePrimaryProfessionPoints())
        {
            if(spellmgr.IsPrimaryProfessionFirstRankSpell(spell_id))
    -            SetFreePrimaryProffesions(freeProfs-1);
    +            SetFreePrimaryProfessions(freeProfs-1);
        }
    
        // add dependent skills
    @@ -3930,9 +3930,9 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool update_action_bar_
        // update free primary prof.points (if not overflow setting, can be in case GM use before .learn prof. learning)
        if(spellmgr.IsPrimaryProfessionFirstRankSpell(spell_id))
        {
    -        uint32 freeProfs = GetFreePrimaryProffesionPoints()+1;
    +        uint32 freeProfs = GetFreePrimaryProfessionPoints()+1;
            if(freeProfs <= sWorld.getConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL))
    -            SetFreePrimaryProffesions(freeProfs);
    +            SetFreePrimaryProfessions(freeProfs);
        }
    
        // remove dependent skill
    @@ -4555,7 +4555,7 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
            return TRAINER_SPELL_GREEN;
    
        // check primary prof. limit
    -    if(spellmgr.IsPrimaryProfessionFirstRankSpell(spell->Id) && GetFreePrimaryProffesionPoints() == 0)
    +    if(spellmgr.IsPrimaryProfessionFirstRankSpell(spell->Id) && GetFreePrimaryProfessionPoints() == 0)
            return TRAINER_SPELL_GREEN_DISABLED;
    
        return TRAINER_SPELL_GREEN;
    @@ -14973,7 +14973,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
            return false;
        }
    
    -    InitPrimaryProffesions();                               // to max set before any spell loaded
    +    InitPrimaryProfessions();                               // to max set before any spell loaded
    
        // init saved position, and fix it later if problematic
        uint32 transGUID = fields[24].GetUInt32();
    @@ -18860,9 +18860,9 @@ template void Player::UpdateVisibilityOf(Corpse*        target, UpdateData& data
    template void Player::UpdateVisibilityOf(GameObject*    target, UpdateData& data, UpdateDataMapType& data_updates, std::set<WorldObject*>& visibleNow);
    template void Player::UpdateVisibilityOf(DynamicObject* target, UpdateData& data, UpdateDataMapType& data_updates, std::set<WorldObject*>& visibleNow);
    
    -void Player::InitPrimaryProffesions()
    +void Player::InitPrimaryProfessions()
    {
    -    SetFreePrimaryProffesions(sWorld.getConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL));
    +    SetFreePrimaryProfessions(sWorld.getConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL));
    }
    
    void Player::SendComboPoints()
    
    ------------------------------ src/game/Player.h ------------------------------
    index 1c6f3b3..02d0157 100644
    @@ -1455,9 +1455,9 @@ class MANGOS_DLL_SPEC Player : public Unit
            void SetGlyph(uint8 slot, uint32 glyph) { SetUInt32Value(PLAYER_FIELD_GLYPHS_1 + slot, glyph); }
            uint32 GetGlyph(uint8 slot) { return GetUInt32Value(PLAYER_FIELD_GLYPHS_1 + slot); }
    
    -        uint32 GetFreePrimaryProffesionPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS2); }
    -        void SetFreePrimaryProffesions(uint16 profs) { SetUInt32Value(PLAYER_CHARACTER_POINTS2, profs); }
    -        void InitPrimaryProffesions();
    +        uint32 GetFreePrimaryProfessionPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS2); }
    +        void SetFreePrimaryProfessions(uint16 profs) { SetUInt32Value(PLAYER_CHARACTER_POINTS2, profs); }
    +        void InitPrimaryProfessions();
    
            PlayerSpellMap const& GetSpellMap() const { return m_spells; }
    

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