[Core] Enabled autopooling code and fixed quest 5203 as well as Troll Beserking and Stoneform Racial
Enabled autopooling code again but this feature is switched off by default. Quest 5203 Escape from Jaedenar should now be fully working, including equipment and name change of the npc, missing spawns have been added. Added Script_command_change_entry, and corrected small mistakes in the code. enable autopooling feature for testing purpose script enhancement for quest 5203 Script command change entry fix Troll Berserking Fix spell stoneform racial
This commit is contained in:
parent
27e7bba44e
commit
e251c79685
@ -1014,7 +1014,7 @@ void PoolManager::LoadFromDB()
|
||||
}
|
||||
}
|
||||
}
|
||||
/*if (sWorld.getConfig(CONFIG_BOOL_AUTOPOOLING_MINING_ENABLE))
|
||||
if (sWorld.getConfig(CONFIG_BOOL_AUTOPOOLING_MINING_ENABLE))
|
||||
{
|
||||
|
||||
// autocreate mining pools
|
||||
@ -1028,7 +1028,7 @@ void PoolManager::LoadFromDB()
|
||||
{
|
||||
PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_entry];
|
||||
pPoolTemplate.MaxLimit = 0;
|
||||
pPoolTemplate.description = "autopool" ;
|
||||
pPoolTemplate.description = "autopool zone %u" ,pool_entry ;
|
||||
pPoolTemplate.AutoSpawn = true; // will update and later data loading
|
||||
}
|
||||
|
||||
@ -1124,7 +1124,7 @@ void PoolManager::LoadFromDB()
|
||||
delete result;
|
||||
|
||||
sLog.outString(">> Loaded %u mining nodes", count);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
// The initialize method will spawn all pools not in an event and not in another pool
|
||||
|
@ -670,9 +670,7 @@ void ScriptMgr::LoadScripts(ScriptMapMapName& scripts, const char* tablename)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SCRIPT_COMMAND_TURN_TO: // 35
|
||||
break;
|
||||
case SCRIPT_COMMAND_SEND_AI_EVENT_AROUND: // 36
|
||||
case SCRIPT_COMMAND_SEND_AI_EVENT_AROUND: // 35
|
||||
{
|
||||
if (tmp.sendAIEvent.eventType >= MAXIMAL_AI_EVENT_EVENTAI)
|
||||
{
|
||||
@ -681,6 +679,8 @@ void ScriptMgr::LoadScripts(ScriptMapMapName& scripts, const char* tablename)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SCRIPT_COMMAND_TURN_TO: // 36
|
||||
break;
|
||||
case SCRIPT_COMMAND_MOVE_DYNAMIC: // 37
|
||||
{
|
||||
if (tmp.moveDynamic.maxDist < tmp.moveDynamic.minDist)
|
||||
@ -704,6 +704,16 @@ void ScriptMgr::LoadScripts(ScriptMapMapName& scripts, const char* tablename)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SCRIPT_COMMAND_CHANGE_ENTRY: // 39
|
||||
{
|
||||
if (tmp.changeEntry.creatureEntry && !ObjectMgr::GetCreatureTemplate(tmp.changeEntry.creatureEntry))
|
||||
{
|
||||
sLog.outErrorDb("Table `%s` has datalong = %u in SCRIPT_COMMAND_CHANGE_ENTRY for script id %u, but this creature_template does not exist.", tablename, tmp.changeEntry.creatureEntry, tmp.id);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
sLog.outErrorDb("Table `%s` unknown command %u, skipping.", tablename, tmp.command);
|
||||
@ -1907,6 +1917,14 @@ bool ScriptAction::HandleScriptStep()
|
||||
MailDraft(m_script->sendMail.mailTemplateId).SendMailTo(static_cast<Player*>(pTarget), sender, MAIL_CHECK_MASK_HAS_BODY, deliverDelay);
|
||||
break;
|
||||
}
|
||||
case SCRIPT_COMMAND_CHANGE_ENTRY: // 39
|
||||
{
|
||||
if (LogIfNotCreature(pSource))
|
||||
{ break; }
|
||||
|
||||
((Creature*)pSource)->UpdateEntry(m_script->changeEntry.creatureEntry);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sLog.outErrorDb(" DB-SCRIPTS: Process table `%s` id %u, command %u unknown command used.", m_table, m_script->id, m_script->command);
|
||||
break;
|
||||
|
@ -146,6 +146,8 @@ enum DBScriptCommand // resSource, resTar
|
||||
// datalong: Send mailTemplateId from resSource (if provided) to player resTarget
|
||||
// datalong2: AlternativeSenderEntry. Use as sender-Entry
|
||||
// dataint1: Delay (>= 0) in Seconds
|
||||
SCRIPT_COMMAND_CHANGE_ENTRY = 39, // resSource = Creature, datalong=creature entry
|
||||
// dataint1 = entry
|
||||
};
|
||||
|
||||
#define MAX_TEXT_ID 4 // used for SCRIPT_COMMAND_TALK, SCRIPT_COMMAND_EMOTE, SCRIPT_COMMAND_CAST_SPELL, SCRIPT_COMMAND_TERMINATE_SCRIPT
|
||||
@ -392,6 +394,12 @@ struct ScriptInfo
|
||||
uint32 altSender; // datalong2;
|
||||
} sendMail;
|
||||
|
||||
struct // SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL (23)
|
||||
{
|
||||
uint32 creatureEntry; // datalong
|
||||
uint32 empty1; // datalong2
|
||||
} changeEntry;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 data[2];
|
||||
|
@ -940,15 +940,15 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
||||
case 1661:
|
||||
{
|
||||
uint32 healthPerc = uint32((float(m_caster->GetHealth()) / m_caster->GetMaxHealth()) * 100);
|
||||
int32 melee_mod = 10;
|
||||
int32 speed_mod = 10;
|
||||
if (healthPerc <= 40)
|
||||
{ melee_mod = 30; }
|
||||
{ speed_mod = 30; }
|
||||
if (healthPerc < 100 && healthPerc > 40)
|
||||
{ melee_mod = 10 + (100 - healthPerc) / 3; }
|
||||
{ speed_mod = 10 + (100 - healthPerc) / 3; }
|
||||
|
||||
int32 hasteModBasePoints0 = melee_mod; // (EffectBasePoints[0]+1)-1+(5-melee_mod) = (melee_mod-1+1)-1+5-melee_mod = 5-1
|
||||
int32 hasteModBasePoints1 = (5 - melee_mod);
|
||||
int32 hasteModBasePoints2 = 5;
|
||||
int32 hasteModBasePoints0 = speed_mod;
|
||||
int32 hasteModBasePoints1 = speed_mod;
|
||||
int32 hasteModBasePoints2 = speed_mod;
|
||||
|
||||
// FIXME: custom spell required this aura state by some unknown reason, we not need remove it anyway
|
||||
m_caster->ModifyAuraState(AURA_STATE_BERSERKING, true);
|
||||
@ -1511,6 +1511,8 @@ void Spell::EffectApplyAura(SpellEffectIndex eff_idx)
|
||||
if (!unitTarget)
|
||||
{ return; }
|
||||
|
||||
if (m_spellInfo->Id == 20594) // Stoneform Racial
|
||||
{ m_caster->CastSpell(m_caster, 20612, true); }
|
||||
if (m_spellInfo->Id == 30918) // Improved Sprint
|
||||
{
|
||||
// Don't need to apply any actual aura here, just remove snare and root effects from the target!
|
||||
|
@ -446,7 +446,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
setConfig(CONFIG_UINT32_RATE_MINING_LOWER, "Rate.Mining.Lower", 50);
|
||||
setConfig(CONFIG_UINT32_RATE_MINING_RARE, "Rate.Mining.Rare", 20);
|
||||
setConfig(CONFIG_UINT32_RATE_MINING_DARKIRON, "Rate.Mining.Darkiron", 10);
|
||||
//setConfig(CONFIG_UINT32_RATE_MINING_AUTOPOOLING, "Rate.Mining.Autopooling", 90);
|
||||
setConfig(CONFIG_UINT32_RATE_MINING_AUTOPOOLING, "Rate.Mining.Autopooling", 90);
|
||||
setConfigPos(CONFIG_FLOAT_RATE_INSTANCE_RESET_TIME, "Rate.InstanceResetTime", 1.0f);
|
||||
setConfigPos(CONFIG_FLOAT_RATE_TALENT, "Rate.Talent", 1.0f);
|
||||
setConfigPos(CONFIG_FLOAT_RATE_CORPSE_DECAY_LOOTED, "Rate.Corpse.Decay.Looted", 0.5f);
|
||||
@ -534,7 +534,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
|
||||
setConfigMinMax(CONFIG_UINT32_CHARACTERS_PER_REALM, "CharactersPerRealm", 10, 1, 10);
|
||||
|
||||
//setConfig(CONFIG_BOOL_AUTOPOOLING_MINING_ENABLE, "Autopooling.Mining.Enable", false);
|
||||
setConfig(CONFIG_BOOL_AUTOPOOLING_MINING_ENABLE, "Autopooling.Mining.Enable", false);
|
||||
|
||||
// must be after CONFIG_UINT32_CHARACTERS_PER_REALM
|
||||
setConfigMin(CONFIG_UINT32_CHARACTERS_PER_ACCOUNT, "CharactersPerAccount", 50, getConfig(CONFIG_UINT32_CHARACTERS_PER_REALM));
|
||||
|
@ -142,7 +142,7 @@ enum eConfigUInt32Values
|
||||
CONFIG_UINT32_RATE_MINING_LOWER,
|
||||
CONFIG_UINT32_RATE_MINING_RARE,
|
||||
CONFIG_UINT32_RATE_MINING_DARKIRON,
|
||||
//CONFIG_UINT32_RATE_MINING_AUTOPOOLING,
|
||||
CONFIG_UINT32_RATE_MINING_AUTOPOOLING,
|
||||
CONFIG_UINT32_SKILL_CHANCE_ORANGE,
|
||||
CONFIG_UINT32_SKILL_CHANCE_YELLOW,
|
||||
CONFIG_UINT32_SKILL_CHANCE_GREEN,
|
||||
@ -346,7 +346,7 @@ enum eConfigBoolValues
|
||||
CONFIG_BOOL_MMAP_ENABLED,
|
||||
CONFIG_BOOL_ELUNA_ENABLED,
|
||||
CONFIG_BOOL_PLAYER_COMMANDS,
|
||||
//CONFIG_BOOL_AUTOPOOLING_MINING_ENABLE,
|
||||
CONFIG_BOOL_AUTOPOOLING_MINING_ENABLE,
|
||||
#ifdef ENABLE_PLAYERBOTS
|
||||
CONFIG_BOOL_PLAYERBOT_DISABLE,
|
||||
CONFIG_BOOL_PLAYERBOT_DEBUGWHISPER,
|
||||
|
@ -550,7 +550,6 @@ struct npc_captured_arkonarin : public CreatureScript
|
||||
pSummoned->AI()->AttackStart(m_creature);
|
||||
else if (pSummoned->GetEntry() == NPC_SPIRT_TREY)
|
||||
{
|
||||
DoScriptText(SAY_TREY_BETRAYER, pSummoned);
|
||||
m_treyGuid = pSummoned->GetObjectGuid();
|
||||
}
|
||||
}
|
||||
@ -565,6 +564,9 @@ struct npc_captured_arkonarin : public CreatureScript
|
||||
|
||||
if (GameObject* pCage = GetClosestGameObjectWithEntry(m_creature, GO_ARKONARIN_CAGE, 5.0f))
|
||||
pCage->Use(m_creature);
|
||||
m_creature->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -579,7 +581,7 @@ struct npc_captured_arkonarin : public CreatureScript
|
||||
case 14:
|
||||
DoScriptText(SAY_FIRST_STOP, m_creature);
|
||||
break;
|
||||
case 34:
|
||||
case 36:
|
||||
DoScriptText(SAY_SECOND_STOP, m_creature);
|
||||
SetRun();
|
||||
break;
|
||||
@ -596,25 +598,36 @@ struct npc_captured_arkonarin : public CreatureScript
|
||||
m_creature->SetFacingToObject(pPlayer);
|
||||
m_bCanAttack = true;
|
||||
DoScriptText(SAY_FOUND_EQUIPMENT, m_creature);
|
||||
// ToDo: change equipment!
|
||||
m_creature->UpdateEntry(11018);
|
||||
break;
|
||||
case 41:
|
||||
DoScriptText(SAY_ESCAPE_DEMONS, m_creature);
|
||||
m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5082.068f, -490.084f, 296.856f, 5.15f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5084.135f, -489.187f, 296.832f, 5.15f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5085.676f, -488.518f, 296.824f, 5.15f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
break;
|
||||
case 43:
|
||||
SetRun(false);
|
||||
break;
|
||||
case 42:
|
||||
DoScriptText(SAY_ESCAPE_DEMONS, m_creature);
|
||||
m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5083.989f, -495.566f, 296.677f, 5.43f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5087.030f, -492.886f, 296.677f, 5.43f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5082.929f, -492.193f, 296.677f, 5.43f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
break;
|
||||
case 50:
|
||||
DoScriptText(SAY_ESCAPE_DEMONS, m_creature);
|
||||
m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5042.718f, -543.696f, 297.801f, 0.84f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5037.962f, -539.510f, 297.801f, 0.84f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
m_creature->SummonCreature(NPC_JAEDENAR_LEGIONNAIRE, 5038.018f, -545.729f, 297.801f, 0.84f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
break;
|
||||
case 104:
|
||||
m_creature->SetFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->SetFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE);
|
||||
m_creature->SummonCreature(NPC_SPIRT_TREY, 4844.839f, -395.763f, 350.603f, 6.25f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
DoScriptText(SAY_FRESH_AIR, m_creature);
|
||||
break;
|
||||
case 105:
|
||||
m_creature->SummonCreature(NPC_SPIRT_TREY, 4844.839f, -395.763f, 350.603f, 6.25f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 60000);
|
||||
DoScriptText(SAY_TREY_BETRAYER, m_creature->GetMap()->GetCreature(m_treyGuid));
|
||||
break;
|
||||
case 106:
|
||||
DoScriptText(SAY_TREY, m_creature);
|
||||
m_creature->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE);
|
||||
break;
|
||||
case 107:
|
||||
if (Creature* pTrey = m_creature->GetMap()->GetCreature(m_treyGuid))
|
||||
|
@ -26,6 +26,6 @@
|
||||
#define MANGOS_H_REVISION
|
||||
#define REVISION_NR "21000"
|
||||
#define REVISION_DB_CHARACTERS "required_21000_01_warden_action"
|
||||
#define REVISION_DB_MANGOS "required_21000_17_dbdocslanguage"
|
||||
#define REVISION_DB_MANGOS "required_21000_18_Update_for_quest_502_and_5203"
|
||||
#define REVISION_DB_REALMD "required_20150420_warden_db_log"
|
||||
#endif // __REVISION_H__
|
||||
|
Loading…
x
Reference in New Issue
Block a user