Jump to content

Spp_

Members
  • Posts

    49
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Spp_

  1. @Schmoozerd y always give credit to the original patch, sometimes i can be wrong because the one who gave the patch wasn't the original coder. If i think someone is just pushing a patch trying to credit for himself i use to get some feedback.

    And... that credit thing in my last post was about someone comming here to give a link on 3rd party project that is not Mangos project nor giving a Mangos port patch. Also my personal review on the code modifications are mainly negative (i could be wrong...) Did i gave a link to my work in trinity? No. This is Mangos and we are talking about status of Dungeon Finder and possibility to port it to Mangos (No 3rd party works, just working mangos patches)

    I'm not against people modifying 3rd party code, if you know how to improve it, go for it.

  2. https://g-core21.svn.sourceforge.net/svnroot/g-core21/ contain dungeon finder but need more work for perfect (based on spp work)

    require add one field in creature_template for end boss of dungeon.

    Some comments about your link:

    - You removed header copyrights. Shouldn't as you using other project files (copy and paste)

    - Removed all comments (why? to make it harder to understand?)

    - Messed up low level rewards by changing LfgRewardEnums

    - LfgProposal is not being initilized in the correct order (this is just a warning)

    - m_killedBosses can't be used as global, each Dungeon has it's own bosses killed. Can't be used just as int, its flags

    - Update has extra not needed calcs before sending QueueStatus

    - Removed use of Player::isLfgDungeonDone(uint32 dungeon) to use Player::GetDoneRandomLfg() that returns a variable that is never initialized. A player can do multiple random dungeons in the same day, so you need to check the dungeon or grouptype

    - Reward system should be moved to quest system so u can forget about that.

    - Doing restriction checks outside the function that returns all the rescrictions (moved from the correct place)

    So, the only addition i see is the use of spell 72221 and rewards (haven't checked how you handle giving the reward when a boss is killed, only lfg files) but imo that way to give rewards is hacky, i haven't added rewards system yet on purpose as i'm trying to fix some other problems first and don't wanna add a way to get money/xp/currencies till all works properly.

    Note: after checking the repo i don't even see any reference to any other project that yours. Neither in commit msgs or code files.

  3. did you think that can be a variable in mangosd.conf that exclude some instance from the dungeon finder, at random and specific mode? why? well we all know that some instance like oculus isnt working, or others like HoR, that we can maybe could get under dev status and at some moment cant be playable so we can exclude them from the system.

    srry my eng, hope you get my point.

    I don't use to code for Mangos, so instance disable is something that needs to be adressed if someone is porting my commits to work with mangos. But that's something that have been implemented in the original code

  4. IMO you should wait to port it to Mangos, more commits will be done soon, some things going to be redone (RewardList is going to be moved to quest system). And, as far as i know there is one Mangos dev working on Dungeon Finder.

    This first commit only gives support to see the random dungeons u can do and the ones u can't (and reason).

  5. Ok all done and works great :D

    diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
    index a03e866..ef7543c 100644
    --- a/src/game/GameObject.cpp
    +++ b/src/game/GameObject.cpp
    @@ -147,7 +147,10 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
        SetGoAnimProgress(animprogress);
    
        if(goinfo->type == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING)
    -        m_health = goinfo->destructibleBuilding.damagedHealth;
    +    {
    +        m_health = goinfo->destructibleBuilding.damagedHealth + goinfo->destructibleBuilding.damagedDisplayId;
    +        SetGoAnimProgress(255);
    +    }
    
        //Notify the map's instance data.
        //Only works if you create the object in it, not if it is moves to that map.
    @@ -208,7 +211,7 @@ void GameObject::Update(uint32 /*p_time*/)
                                udata.BuildPacket(&packet);
                                ((Player*)caster)->GetSession()->SendPacket(&packet);
    
    -                            SendGameObjectCustomAnim(GetGUID());
    +                            SendGameObjectCustomAnim(GetGUID(), GetGoAnimProgress());
                            }
    
                            m_lootState = GO_READY;                 // can be successfully open with some chance
    @@ -1075,7 +1078,7 @@ void GameObject::Use(Unit* user)
    
                // this appear to be ok, however others exist in addition to this that should have custom (ex: 190510, 188692, 187389)
                if (time_to_restore && info->goober.customAnim)
    -                SendGameObjectCustomAnim(GetGUID());
    +                SendGameObjectCustomAnim(GetGUID(), GetGoAnimProgress());
                else
                    SetGoState(GO_STATE_ACTIVE);
    
    @@ -1462,6 +1465,8 @@ void GameObject::TakenDamage(uint32 damage, Unit* pKiller)
            else
                m_health = 0;
        }
    +
    +    SetGoAnimProgress(m_health*255/(m_goInfo->destructibleBuilding.damagedDisplayId + m_goInfo->destructibleBuilding.destroyedHealth));
    }
    
    void GameObject::Rebuild(Unit* pKiller)
    diff --git a/src/game/Object.cpp b/src/game/Object.cpp
    index 55cc856..07ba552 100644
    --- a/src/game/Object.cpp
    +++ b/src/game/Object.cpp
    @@ -1618,11 +1618,11 @@ void WorldObject::SendObjectDeSpawnAnim(uint64 guid)
        SendMessageToSet(&data, true);
    }
    
    -void WorldObject::SendGameObjectCustomAnim(uint64 guid)
    +void WorldObject::SendGameObjectCustomAnim(uint64 guid, uint8 animprogress)
    {
        WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM, 8+4);
        data << uint64(guid);
    -    data << uint32(0);                                      // not known what this is
    +    data << uint32(animprogress);
        SendMessageToSet(&data, true);
    }
    
    diff --git a/src/game/Object.h b/src/game/Object.h
    index 074fc94..527bec5 100644
    --- a/src/game/Object.h
    +++ b/src/game/Object.h
    @@ -447,7 +447,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object
            void PlayDirectSound(uint32 sound_id, Player* target = NULL);
    
            void SendObjectDeSpawnAnim(uint64 guid);
    -        void SendGameObjectCustomAnim(uint64 guid);
    +        void SendGameObjectCustomAnim(uint64 guid, uint8 animprogress);
    
            virtual bool IsHostileTo(Unit const* unit) const =0;
            virtual bool IsFriendlyTo(Unit const* unit) const =0;

    That's the last update enjoy it and thanks to all :)

    U have a typo... u using DisplayId in the health calculation... "m_goInfo->destructibleBuilding.damagedDisplayId" i think it should be "m_goInfo->destructibleBuilding.damagedHealth"

  6. I'm trying with this

    // Some code... 
    -void WorldObject::SendGameObjectCustomAnim(uint64 guid)
    +void WorldObject::SendGameObjectCustomAnim(uint64 guid, uint8 animprogress)
    {
        WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM, 8+4);
        data << uint64(guid);
    -    data << uint32(0);                                      // not known what this is
    +    data << uint8(animprogress);
        SendMessageToSet(&data, true);
    }
    

    but still can't see healthbar, what's wrong?

    Dont' change types when sending opcodes, it needs to be uint32. idk about healthbar, that was just enough in trinity.

    u can just test the hp bar thing with ".debug send opcode" u will need the opcode.txt file in the bin folder file with the correct data

    179
    uint64
    TheGOGuid (Not the db value, u need the uint64 used in code)
    uint32
    animprogress
    

  7. To see GO healthbar need to change

    void WorldObject::SendGameObjectCustomAnim(uint64 guid)
    {
       WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM, 8+4);
       data << uint64(guid);
       data << uint32(0);                                      // not known what this is
       SendMessageToSet(&data, true);
    }
    

    To

    void WorldObject::SendGameObjectCustomAnim(uint64 guid, uint8 animprogress)
    {
       WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM, 8+4);
       data << uint64(guid);
       data << uint32(animprogress);
       SendMessageToSet(&data, true);
    }
    

    In Object.cpp

    Remember u need to set animprogress = 255 on DB or force the value on GameObject::create and update the value in TakenDamage

    Depending on the GO health u going to need a lot of hits.

  8. IMO all code related to ZoneScript should be removed:

    - That is not Destructible Object dependant (ie: adding 2 functionalities in one patch).

    - Adding stuff from trinity AS IS is without removing the unused data (ZoneScript only using 1 function)

    - Why Rebuild event depends on the killer? those events are supposed to be notified always, not depending on the player.

    Note: Remember to give credits to the original authors.

  9. U only need the guid of the GO

    void BattleGround::DoorOpen(uint64 const& guid)
    

    + u are providing the guid of the GO in the db. if u don't wanna do it guid dependent u can use this code

    GameObject* WorldObject::FindNearestGameObject(uint32 entry, float range)
    {
       GameObject *go = NULL;
       MaNGOS::NearestGameObjectEntryInObjectRangeCheck checker(*this, entry, range);
       MaNGOS::GameObjectLastSearcher<MaNGOS::NearestGameObjectEntryInObjectRangeCheck> searcher(this, go, checker);
       Cell::VisitGridObjects(this, checker, range);
       return go;
    }
    

    But u will need to have an object... and u only will have players asap they join, so u can get pointers to all GO's asap 1 player joins the server. It's nasty but won't make u depend on guids

    Note: The above comment is done without knowing Mangos functions. Maybe there's a better way to do it.

  10. The code in TakenDamage is wrong

       if(m_health > damage)
       {
           m_health -= damage;
           return;
       }
       m_health = 0;
    

    should be

    if (m_health > damage)
       m_health -= damage;
    else
       m_health = 0;

    Or it will never update the display and flags of the GO.

    U should also add check for factions as i did for trinity, otherwise people can attack their own buildings. In WG some cheaters helped the other team to win destroying their own buildings. Also after TakenDamage send SMSG_DESTRUCTIBLE_BUILDING_DAMAGE

    // Trinity code, Adapt to Mangos (if needed)
    void Spell::EffectWMODamage(uint32 /*i*/)
    {
       if (gameObjTarget && gameObjTarget->GetGoType() == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING)
       {
           Unit *caster = m_originalCaster;
           if (!caster)
               return;
    
           FactionTemplateEntry const *casterft, *goft;
           casterft = caster->getFactionTemplateEntry();
           goft = sFactionTemplateStore.LookupEntry(gameObjTarget->GetUInt32Value(GAMEOBJECT_FACTION));
           // Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls)
           if (casterft && goft && !casterft->IsFriendlyTo(*goft))
           {
               gameObjTarget->TakenDamage(uint32(damage), caster);
               WorldPacket data(SMSG_DESTRUCTIBLE_BUILDING_DAMAGE, 8+8+8+4+4);
               data.append(gameObjTarget->GetPackGUID());
               data.append(caster->GetPackGUID());
               if (Unit *who = caster->GetCharmerOrOwner())
                   data.append(who->GetPackGUID());
               else
                   data.append(caster->GetPackGUID());
               data << uint32(damage);
               data << uint32(m_spellInfo->Id);
               gameObjTarget->SendMessageToSet(&data, false);
           }
       }
    }

    About HealthBar:

    Need to set animprogress with the correct value. On creation force AnimProgress to 255 (or update DB value), each time it gets damaged update with the formula (Health*255/MaxHealth)

  11. * What bug does the patch fix? What features does the patch add?

    Adds null handler to all opcodes that don't have any

    * For which repository revision was the patch created?

    9806

    * Who has been writing this patch?

    Spp

    diff --git a/src/game/Opcodes.cpp b/src/game/Opcodes.cpp
    index 13ae079..0b876e3 100644
    --- a/src/game/Opcodes.cpp
    +++ b/src/game/Opcodes.cpp
    @@ -1313,4 +1313,24 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
        /*0x504*/ { "UMSG_UNKNOWN_1284",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
        /*0x505*/ { "UMSG_UNKNOWN_1285",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
        /*0x506*/ { "UMSG_UNKNOWN_1286",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x507*/ { "UMSG_UNKNOWN_1287",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x508*/ { "CMSG_UNKNOWN_1288",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x509*/ { "CMSG_UNKNOWN_1289",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x50A*/ { "SMSG_CAMERA_SHAKE",                            STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
    +    /*0x50B*/ { "SMSG_UNKNOWN_1291",                            STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
    +    /*0x50C*/ { "UMSG_UNKNOWN_1292",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x50D*/ { "UMSG_UNKNOWN_1293",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x50E*/ { "CMSG_UNKNOWN_1294",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x50F*/ { "UMSG_UNKNOWN_1295",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x510*/ { "CMSG_UNKNOWN_1296",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x511*/ { "UMSG_UNKNOWN_1297",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x512*/ { "CMSG_UNKNOWN_1298",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x513*/ { "UMSG_UNKNOWN_1299",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x514*/ { "SMSG_UNKNOWN_1300",                            STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
    +    /*0x515*/ { "SMSG_UNKNOWN_1301",                            STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
    +    /*0x516*/ { "SMSG_UNKNOWN_1302",                            STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
    +    /*0x517*/ { "CMSG_UNKNOWN_1303",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x518*/ { "SMSG_UNKNOWN_1304",                            STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
    +    /*0x519*/ { "UMSG_UNKNOWN_1305",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x51A*/ { "UMSG_UNKNOWN_1306",                            STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    };
    

  12. Dalaran Serwers: My patch was for 3.1.3. Some info was taken from Mateo. Was just for testing and i've never included it in trinitycore because of people not being pushed out the spawning sewers. Waterfall doesn't make u lose LoS and was lacking some off data to make knock people.

    About Ring of Valor: i've coded that arena in trinitycore, but has the LoS pillar problem. The problem with elevators is a problem with dynamic GO's, it's solved in trinitycore (By Opterman and me). Opterman told me he was going to send a patch to mangos.

    - Have to update RoV to 3.2.2 as it was coded for 3.1.3 and has some changes (areatrigger codes + remove fire events)

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