Jump to content

envien

Members
  • Posts

    3
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

envien's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. What this patch do? -You can setup character creation by (mangosd.conf) For example...Player can create only Tauren or Night Elf and can't create another class. Or player can create Tauren of Night Elf and can have all profession except Rogue or another. [idea]: eNVieN [Patch Autor]: DLxko [Revision Work]: [9723] [%WORK?]: Tested - Work [Clock for Maximalized]: [REMOVED: ingame screenshot] 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
  2. Hi, Auctionhouse table i always delete, but AH bot my setting ingoring and get all items to sell.
  3. Dear members, i need help with Auction House, i can set Auction House Bot to sell only Green & Blue items. I set 'percenttradegoods' and 'percentitems' at white, grey & purple (epic) to 0% & Green and Blue to 50%, but AHBot sell all (Purple, grey...all). He ignoring my settings. Please, listen me and send me help with that. Thanks very much.
×
×
  • 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