Doble especializacion para mangos (Opcion1).

¿Quieres poner la doble especialización de talentos y no sabes cómo?
Es sencillo, usa este código:




[blockquote]SDName: Profesion
SD%Complete: 100
SDComment: Profesion Master
SDCategory: NPC
EndScriptData */

#include "precompiled.h"
#include "../../../../shared/Config/Config.h"
#ifndef _MANGOS_SCRIPT_CONFIG
# define _MANGOS_SCRIPT_CONFIG "mangosd.conf"
#endif _MANGOS_SCRIPT_CONFIG

bool GossipHello_Profesion(Player* pPlayer, Creature* pCreature)
{
Config TScriptConfig;
if(!TScriptConfig.SetSource(_TRINITY_SCRIPT_CONFIG,true))
error_log("TScript: Unable to open configuration file");

if(TScriptConfig.GetBoolDefault("Profesion.OnlyGMs", false)) // If Profesion.OnlyGMs is enabled in trinitycore.conf
if (pPlayer->GetSession()->GetSecurity() == SEC_PLAYER)
{
pCreature->MonsterWhisper("Sorry, I can only trade to game masters.", pPlayer->GetGUID());
return true;
}

bool EnableProfessions = TScriptConfig.GetBoolDefault("Profesion.EnableProfessions", true);
bool EnableSecondarySkills = TScriptConfig.GetBoolDefault("Profesion.EnableSecondarySkills", true);

// Main Menu for Alliance
if (pPlayer->GetTeam() == ALLIANCE)
{
// Check config if "Professions" is enabled or not
if(EnableProfessions)
pPlayer->ADD_GOSSIP_ITEM( 7, "Profesiones ->" , GOSSIP_SENDER_MAIN, 1000);
// Check config if "Secondary Skills" is enabled or not
if(EnableSecondarySkills)
pPlayer->ADD_GOSSIP_ITEM( 7, "Skills Secundarias ->" , GOSSIP_SENDER_MAIN, 2000);
}
else // Main Menu for Horde
{
// Check config if "Professions" is enabled or not
if(EnableProfessions)
pPlayer->ADD_GOSSIP_ITEM( 7, "Profesiones ->" , GOSSIP_SENDER_MAIN, 1000);
// Check config if "Secondary Skills" is enabled or not
if(EnableSecondarySkills)
pPlayer->ADD_GOSSIP_ITEM( 7, "Skills Secundarias ->" , GOSSIP_SENDER_MAIN, 2000);
}

pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());

return true;
}

void SendDefaultMenu_Profesion(Player* pPlayer, Creature* pCreature, uint32 action)
{

// Not allow in combat
if (pPlayer->isInCombat())
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->MonsterSay("Estás en Combate!", LANG_UNIVERSAL, NULL);
return;
}

Config TScriptConfig;
if(!TScriptConfig.SetSource(_TRINITY_SCRIPT_CONFIG,true))
error_log("TScript: Unable to open configuration file");
bool EnableProfessions = TScriptConfig.GetBoolDefault("Profesion.EnableProfessions", true);
bool EnableSecondarySkills = TScriptConfig.GetBoolDefault("Profesion.EnableSecondarySkills", true);

//Mony Check
if (pPlayer->GetMoney() < (TScriptConfig.GetFloatDefault("SkillGoldCost",0)))
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->MonsterWhisper("No tienes suficiente Dinero.", pPlayer->GetGUID());
return;
}



Fuente: Diantonix
 

Comentarios

  1. y que hago con ese codigo?

    ResponderEliminar
  2. Pues habilitar en mangos la doble especializacion de talentos

    ResponderEliminar
  3. qmierda ni vos sabes que hacer

    ResponderEliminar
  4. :) claro yo no se hacerlo xD por eso mi server es una mierda y no tiene dual spec ;) claro tío buscate las castañas porque este post tiene mas años que tú.

    ResponderEliminar

Publicar un comentario

(Recuerda no ofender a nadie)

Entradas populares