Jump to content

a few patches on another forum


Guest Xees

Recommended Posts

i Found a lot of patches on http://www.wowresource.eu

translated them to english and here they are .

[Patch] Adding support for Gossip Dual Talent Spec

SQL:

REPLACE INTO gossip_menu_option ( menu_id `` , `` id , `option_icon` , `` option_text , option_id `` , `` npc_option_npcflag , action_menu_id `` , `` action_poi_id , action_script_id `` , `` box_coded , box_money `` , `` box_text , cond_1 `` , `` cond_1_val_1 , cond_1_val_2 `` , ` cond_2 ` , `` cond_2_val_1 , cond_2_val_2 `` , `` cond_3 , cond_3_val_1 `` , `` cond_3_val_2 ) VALUES
( 0, 16, 0, 'Purchase and Dual Specialization Talent.' , 18, 16, 0, 0, 0, 0, 10000000, 'Are you sure you Wish to purchase a Dual Specialization Talent? " , 0, 0, 0, 0, 0, 0, 0, 0, 0); 

REPLACE INTO `achievement_criteria_requirement`  ( criteria_id `` ,`type` ,, `value1` ) VALUES
( '9619 ' ,'0 ' ,'63624 ' );

Patch :

diff - git a / src / game / GossipDef .hb / src / game / GossipDef .h 
index e3a3c9b ..fdfe83e 100644
--- a / src / game / GossipDef .h 
+ + + b / src / game / GossipDef .h 
@ @  - 48,6 + 48,7 @ @  enum  Gossip_Option 
GOSSIP_OPTION_ARMORER =  15,                   / / UNIT_NPC_FLAG_ARMORER (4096) 
GOSSIP_OPTION_UNLEARNTALENTS =  16,                   / / UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER) 
GOSSIP_OPTION_UNLEARNPETSKILLS =  17,                   / / UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER) 
+ GOSSIP_OPTION_LEARNDUALSPEC =  18,                   / / UNIT_NPC_FLAG_TRAINER (bonus option for GOSSIP_OPTION_TRAINER) 
GOSSIP_OPTION_MAX 
) 

diff - git a / src / Game / Player .cpp b / src / Game / Player .cpp 
index e3a3c9b ..fdfe83e 100644
--- a / src / Game / Player .cpp 
+ + + b / src / Game / Player .cpp 
@ @  - 12652,6 + 12652,10 @ @  void  Player ::PrepareGossipMenu ( WorldObject  * pSource ,uint32 menuId ) 
                    if  (! pCreature -> isCanTrainingOf ( this , false )) 
bCanTalk =  false ; 
                    break ; 
+                 case GOSSIP_OPTION_LEARNDUALSPEC :
+                     if (! ( GetSpecsCount ()  ==  1 & & pCreature -> isCanTrainingAndResetTalentsOf ( this )  & &  ! ( getLevel ()  <  40)))  / / Level added manually, in original patch it was in config! 
+ bCanTalk =  false ; 
+                     break ; 
                case GOSSIP_OPTION_UNLEARNTALENTS :
                    if  (! pCreature -> isCanTrainingAndResetTalentsOf ( this )) 
bCanTalk =  false , 
@ @  - 12851,6 + 12855,29 @ @  void  Player ::OnGossipSelect ( WorldObject * pSource ,gossipListId uint32 ,uint32 my 
        case GOSSIP_OPTION_TRAINER :
            GetSession () -> SendTrainerList ( GUID ) 
            break ; 
+         case GOSSIP_OPTION_LEARNDUALSPEC :
+             if ( GetSpecsCount ()  ==  1 & &  ! ( getLevel ()  <  40))  : / / Level manually added, in an original patch it was in config! 
+             ( 
+                 if  ( GetMoney ()  <  10000000)  : / / Sam: it was in config, 1000g default, change it if you want 
+                 ( 
+                     SendBuyError ( BUY_ERR_NOT_ENOUGHT_MONEY , 0, 0, 0) 
+                     PlayerTalkClass -> CloseGossip () 
+                     break ; 
+                 ) 
+                 else 
+                 ( 
+                     ModifyMoney (- 10000000)  / / Sam: here too 
+ 
+                     / / Cast spells That Teach dual spec 
+                     / / Both are ImplicitTarget Also self and Must Be part of the player 
+                     CastSpell ( this ,63680,true ,NULL ,NULL ,GetGUID ()) 
+                     CastSpell ( this ,63624,true ,NULL ,NULL ,GetGUID ()) 
+ 
+                     / / Should show Gossip Another text with "Congratulations ..." 
+                     PlayerTalkClass -> CloseGossip () 
+                 ) 
+             ) 
+             break ; 
        case GOSSIP_OPTION_UNLEARNTALENTS :
            PlayerTalkClass -> CloseGossip (); 
            SendTalentWipeConfirm ( GUID );

[PATCH]: Add config option to enable / disable character by establishing specific characteristics

Patch :

diff --git a/CharacterHandler.cpp b/CharacterHandler.cpp
index ae7e3f1..2e5de34 100644
--- a/CharacterHandler.cpp
+++ b/CharacterHandler.cpp
@@ -319,6 +319,7 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )

    // speedup check for heroic class disabled case
    uint32 heroic_free_slots = sWorld.getConfig(CONFIG_UINT32_HEROIC_CHARACTERS_PER_REALM);
+
    if(heroic_free_slots == 0 && GetSecurity() == SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT)
    {
        data << (uint8)CHAR_CREATE_UNIQUE_CLASS_LIMIT;
@@ -326,6 +327,144 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
        return;
    }

+//=========================================//
+///Character Create Disable PATCH by DLxko///
+//=========================================//
+
+//First we need get this from config =D for all races /classes
+uint32 warrior = sWorld.getConfig(CONFIG_UINT32_WARRIOR_ENABLE); 
+uint32 paladin = sWorld.getConfig(CONFIG_UINT32_PALADIN_ENABLE);
+uint32 hunter = sWorld.getConfig(CONFIG_UINT32_HUNTER_ENABLE);
+uint32 rogue = sWorld.getConfig(CONFIG_UINT32_ROGUE_ENABLE);
+uint32 priest = sWorld.getConfig(CONFIG_UINT32_PRIEST_ENABLE);
+uint32 shaman = sWorld.getConfig(CONFIG_UINT32_SHAMAN_ENABLE);
+uint32 mage = sWorld.getConfig(CONFIG_UINT32_MAGE_ENABLE);
+uint32 warlock = sWorld.getConfig(CONFIG_UINT32_WARLOCK_ENABLE);
+
+
+uint32 dwarf = sWorld.getConfig(CONFIG_UINT32_DWARF_ENABLE);
+uint32 gnome = sWorld.getConfig(CONFIG_UINT32_GNOME_ENABLE);
+uint32 human = sWorld.getConfig(CONFIG_UINT32_HUMAN_ENABLE);
+uint32 nightelf = sWorld.getConfig(CONFIG_UINT32_NIGHTELF_ENABLE);
+uint32 orc = sWorld.getConfig(CONFIG_UINT32_ORC_ENABLE);
+uint32 tauren = sWorld.getConfig(CONFIG_UINT32_TAUREN_ENABLE);
+uint32 troll = sWorld.getConfig(CONFIG_UINT32_TROLL_ENABLE);
+uint32 undead = sWorld.getConfig(CONFIG_UINT32_UNDEAD_ENABLE);
+uint32 bloodelf = sWorld.getConfig(CONFIG_UINT32_BLOODELF_ENABLE);
+uint32 draenei = sWorld.getConfig(CONFIG_UINT32_DRAENEI_ENABLE);
+
+//If disabled class return error
+if(warrior == 0  && class_ == CLASS_WARRIOR)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(paladin == 0  && class_ == CLASS_PALADIN)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(hunter == 0  && class_ == CLASS_HUNTER)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(rogue == 0  && class_ == CLASS_ROGUE)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(priest == 0  && class_ == CLASS_PRIEST)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(shaman == 0  && class_ == CLASS_SHAMAN)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(mage == 0  && class_ == CLASS_MAGE)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(warlock == 0  && class_ == CLASS_WARLOCK)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+
+
+if(dwarf == 0  && race_ == RACE_DWARF)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(gnome == 0  && race_ == RACE_GNOME)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(human == 0  && race_ == RACE_HUMAN)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(nightelf == 0  && race_ == RACE_NIGHTELF)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(orc == 0  && race_ == RACE_ORC)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(tauren == 0  && race_ == RACE_TAUREN)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(troll == 0  && race_ == RACE_TROLL)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(undead == 0  && race_ == RACE_UNDEAD_PLAYER)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(bloodelf == 0  && race_ == RACE_BLOODELF)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+if(draenei == 0  && race_ == RACE_DRAENEI)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }
+
    // speedup check for heroic class disabled case
    uint32 req_level_for_heroic = sWorld.getConfig(CONFIG_UINT32_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING);
    if(GetSecurity() == SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT && req_level_for_heroic > sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL))
diff --git a/World.cpp b/World.cpp
index 6bf621c..cc3d29a 100644
--- a/World.cpp
+++ b/World.cpp
@@ -570,6 +570,28 @@ void World::LoadConfigSettings(bool reload)

    setConfigMinMax(CONFIG_UINT32_HEROIC_CHARACTERS_PER_REALM, "HeroicCharactersPerRealm", 1, 1, 10);

+       setConfig(CONFIG_UINT32_WARRIOR_ENABLE, "Warrior.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_PALADIN_ENABLE, "Paladin.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_HUNTER_ENABLE, "Hunter.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_ROGUE_ENABLE, "Rogue.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_PRIEST_ENABLE, "Priest.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_SHAMAN_ENABLE, "Shaman.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_MAGE_ENABLE, "Mage.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_WARLOCK_ENABLE, "Warlock.Character.Enable", 0);
+
+       setConfig(CONFIG_UINT32_DWARF_ENABLE, "Dwarf.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_GNOME_ENABLE, "Gnome.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_HUMAN_ENABLE, "Human.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_NIGHTELF_ENABLE, "NightElf.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_ORC_ENABLE, "Orc.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_TAUREN_ENABLE, "Tauren.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_TROLL_ENABLE, "Troll.Character.Enable", 0);
+       setConfig(CONFIG_UINT32_UNDEAD_ENABLE, "Undead.Character.Enable", 0);
+  setConfig(CONFIG_UINT32_BLOODELF_ENABLE, "BloodElf.Character.Enable", 0);
+  setConfig(CONFIG_UINT32_DRAENEI_ENABLE, "Draenei.Character.Enable", 0);
+
+
+
    setConfig(CONFIG_UINT32_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING, "MinLevelForHeroicCharacterCreating", 55);

    setConfigMinMax(CONFIG_UINT32_SKIP_CINEMATICS, "SkipCinematics", 0, 0, 2);
diff --git a/World.h b/World.h
index a4e4f6f..4eb28eb 100644
--- a/World.h
+++ b/World.h
@@ -177,7 +177,25 @@ enum eConfigUInt32Values
    CONFIG_UINT32_TIMERBAR_FIRE_GMLEVEL,
    CONFIG_UINT32_TIMERBAR_FIRE_MAX,
    CONFIG_UINT32_MIN_LEVEL_STAT_SAVE,
-    CONFIG_UINT32_VALUE_COUNT
+    CONFIG_UINT32_VALUE_COUNT,
+       CONFIG_UINT32_WARRIOR_ENABLE,
+         CONFIG_UINT32_PALADIN_ENABLE,
+       CONFIG_UINT32_HUNTER_ENABLE,
+       CONFIG_UINT32_ROGUE_ENABLE,
+       CONFIG_UINT32_PRIEST_ENABLE,
+       CONFIG_UINT32_SHAMAN_ENABLE,
+       CONFIG_UINT32_MAGE_ENABLE,
+         CONFIG_UINT32_WARLOCK_ENABLE,
+       CONFIG_UINT32_DWARF_ENABLE,
+       CONFIG_UINT32_GNOME_ENABLE,
+         CONFIG_UINT32_HUMAN_ENABLE,
+       CONFIG_UINT32_NIGHTELF_ENABLE,
+         CONFIG_UINT32_ORC_ENABLE,
+       CONFIG_UINT32_TAUREN_ENABLE,
+       CONFIG_UINT32_TROLL_ENABLE,
+         CONFIG_UINT32_UNDEAD_ENABLE,
+         CONFIG_UINT32_BLOODELF_ENABLE,
+         CONFIG_UINT32_DRAENEI_ENABLE
};

/// Configuration elements
diff --git a/mangosd.conf.dist.in b/mangosd.conf.dist.in
index 5d4053f..2adef11 100644
--- a/mangosd.conf.dist.in
+++ b/mangosd.conf.dist.in
@@ -1451,3 +1451,39 @@ SOAP.Enabled = 0
SOAP.IP = 127.0.0.1
SOAP.Port = 7878

+###################################################################################################################
+# NEW CHARACTER CREATE
+#    
+#    *RACE*.Character.enable
+#        (A: Human, Dwarf, Gnome, Night Elf, Draenei / H: Orc, Troll, Undead, Tauren, Blood Elf)
+#                 0 - disable (blocked)
+#        Default: 1 - enable  (enabled)
+#
+#    *CLASS*.Character.enable
+#        (Warrior, Paladin, Death Knight, Shaman, Hunter, Druid, Rogue, Priest, Mage, Warlock)
+#                 0 - disable (blocked)
+#        Default: 1 - enable  (enabled)
+#
+###################################################################################################################
+
+Human.Character.enable = 1
+Dwarf.Character.enable = 1
+Gnome.Character.enable = 1
+NightElf.Character.enable = 1
+Draenei.Character.enable = 1
+Orc.Character.enable = 1
+Troll.Character.enable = 1
+Undead.Character.enable = 1
+Tauren.Character.enable = 1
+BloodElf.Character.enable = 1
+
+Warrior.Character.enable = 1
+Paladin.Character.enable = 1
+DeathKnight.Character.enable = 1
+Shaman.Character.enable = 1
+Hunter.Character.enable = 1
+Druid.Character.enable = 1
+Rogue.Character.enable = 1
+Priest.Character.enable = 1
+Mage.Character.enable = 1
+Warlock.Character.enable = 1

Patch : Added support for DeathKnight

diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp
index 68754d8..f5acf06 100644
--- a/src/game/CharacterHandler.cpp
+++ b/src/game/CharacterHandler.cpp
@@ -340,7 +340,7 @@ uint32 priest = sWorld.getConfig(CONFIG_UINT32_PRIEST_ENABLE);
uint32 shaman = sWorld.getConfig(CONFIG_UINT32_SHAMAN_ENABLE);
uint32 mage = sWorld.getConfig(CONFIG_UINT32_MAGE_ENABLE);
uint32 warlock = sWorld.getConfig(CONFIG_UINT32_WARLOCK_ENABLE);
-
+uint32 deathknight = sWorld.getConfig(CONFIG_UINT32_DEATH_KNIGHT_ENABLE);

uint32 dwarf = sWorld.getConfig(CONFIG_UINT32_DWARF_ENABLE);
uint32 gnome = sWorld.getConfig(CONFIG_UINT32_GNOME_ENABLE);
@@ -402,7 +402,12 @@ if(warlock == 0  && class_ == CLASS_WARLOCK)
        SendPacket( &data );
        return;
    }
-
+if(deathknight == 0  && class_ == CLASS_DEATH_KNIGHT)
+    {
+        data << (uint8)CHAR_CREATE_DISABLED;
+        SendPacket( &data );
+        return;
+    }

if(dwarf == 0  && race_ == RACE_DWARF)
    {
diff --git a/src/game/World.cpp b/src/game/World.cpp
index 05e6b9e..0f8ef0f 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -579,6 +579,7 @@ void World::LoadConfigSettings(bool reload)
    setConfig(CONFIG_UINT32_SHAMAN_ENABLE, "Shaman.Character.Enable", 0);
    setConfig(CONFIG_UINT32_MAGE_ENABLE, "Mage.Character.Enable", 0);
    setConfig(CONFIG_UINT32_WARLOCK_ENABLE, "Warlock.Character.Enable", 0);
+   setConfig(CONFIG_UINT32_DEATH_KNIGHT_ENABLE, "DeathKnightCharacter.Enable", 0);

    setConfig(CONFIG_UINT32_DWARF_ENABLE, "Dwarf.Character.Enable", 0);
    setConfig(CONFIG_UINT32_GNOME_ENABLE, "Gnome.Character.Enable", 0);
diff --git a/src/game/World.h b/src/game/World.h
index 6ea9a18..1d774ac 100644
--- a/src/game/World.h
+++ b/src/game/World.h
@@ -187,6 +187,7 @@ enum eConfigUInt32Values
    CONFIG_UINT32_SHAMAN_ENABLE,
    CONFIG_UINT32_MAGE_ENABLE,
    CONFIG_UINT32_WARLOCK_ENABLE,
+   CONFIG_UINT32_DEATH_KNIGHT_ENABLE,
    CONFIG_UINT32_DWARF_ENABLE,
    CONFIG_UINT32_GNOME_ENABLE,
    CONFIG_UINT32_HUMAN_ENABLE,
-- 
1.7.0.2

Player Looting Dead Player

diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp
index 9731442..38d780d 100644
--- a/src/game/LootHandler.cpp
+++ b/src/game/LootHandler.cpp
@@ -29,6 +29,7 @@
#include "Group.h"
#include "World.h"
#include "Util.h"
+#include "ObjectAccessor.h"

void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data )
{
@@ -68,6 +69,16 @@ void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data )

        loot = &pItem->loot;
    }
+    else if (IS_CORPSE_GUID(lguid))
+    {
+        Corpse *bones = ObjectAccessor::GetCorpse(*player, lguid);
+        if (!bones)
+        {
+            player->SendLootRelease(lguid);
+            return;
+        }
+        loot = &bones->loot;
+    }
    else
    {
        Creature* pCreature =
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index ed23d9c..b88c33d 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3764,8 +3764,7 @@ void Player::CreateCorpse()
        flags |= CORPSE_FLAG_HIDE_HELM;
    if(HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK))
        flags |= CORPSE_FLAG_HIDE_CLOAK;
-    if(InBattleGround())
-        flags |= CORPSE_FLAG_LOOTABLE;                      // to be able to remove insignia
+    flags |= CORPSE_FLAG_LOOTABLE;                      // to be able to remove insignia
    corpse->SetUInt32Value( CORPSE_FIELD_FLAGS, flags );

    corpse->SetUInt32Value( CORPSE_FIELD_DISPLAY_ID, GetNativeDisplayId() );
@@ -6993,8 +6992,8 @@ bool Player::CheckAmmoCompatibility(const ItemPrototype *ammo_proto) const
    Called by remove insignia spell effect    */
void Player::RemovedInsignia(Player* looterPlr)
{
-    if (!GetBattleGroundId())
-        return;
+//    if (!GetBattleGroundId()) because we want lootable players everywhere
+//        return;

    // If not released spirit, do it !
    if(m_deathTimer > 0)
@@ -7139,6 +7138,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
            bones->lootForBody = true;
            uint32 pLevel = bones->loot.gold;
            bones->loot.clear();
+            loot->FillLoot(1, LootTemplates_Creature, this); //1 is the id in creature_template
            // It may need a better formula
            // Now it works like this: lvl10: ~6copper, lvl70: ~9silver
            bones->loot.gold = (uint32)( urand(50, 150) * 0.016f * pow( ((float)pLevel)/5.76f, 2.5f) * sWorld.getRate(RATE_DROP_MONEY) );

Idk if its reposts just though i should share em

Link to comment
Share on other sites

None of these are new.

Looting player corpses has been floating around for a very long time. I think it was balrok who first introduced a "proof-of-concept" patch.

Blocking creation of specific races/classes per realm has been in the Core Mods section for weeks now.

Isn't Dual Spec now completely integrated into the core, making the Gossip Patch deprecated?

I thought MaNGOS had full support, not counting database and scripting, for Death Knights since 0.15 so why is this even a patch you'd want to use for 3.2.0 clients and above?

Link to comment
Share on other sites

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