From de984aeef8d67ce5fa25774e404318e168bdebdb Mon Sep 17 00:00:00 2001 From: jokerlfm Date: Fri, 3 May 2024 23:18:12 +0800 Subject: [PATCH] pretransfer --- .../Nier/NierActions/NierAction_Priest.cpp | 126 +----------------- src/game/Nier/NierManager.cpp | 13 +- src/game/Nier/NierManager.h | 1 + src/game/ObjectMgr.cpp | 2 +- 4 files changed, 14 insertions(+), 128 deletions(-) diff --git a/src/game/Nier/NierActions/NierAction_Priest.cpp b/src/game/Nier/NierActions/NierAction_Priest.cpp index b04578f05b4..27fdc2d51e7 100644 --- a/src/game/Nier/NierActions/NierAction_Priest.cpp +++ b/src/game/Nier/NierActions/NierAction_Priest.cpp @@ -560,131 +560,7 @@ bool NierAction_Priest::Heal(Unit* pmTarget, bool pmInstantOnly) bool NierAction_Priest::Heal_Discipline(Unit* pmTarget, bool pmInstantOnly) { - float targetHealthPct = pmTarget->GetHealthPercent(); - if (targetHealthPct < 40.0f) - { - if (spell_DesperatePrayer > 0) - { - if (pmTarget->GetGUID() == me->GetGUID()) - { - if (CastSpell(pmTarget, spell_DesperatePrayer)) - { - return true; - } - } - } - if (spell_PowerWord_Shield > 0) - { - if (!pmTarget->HasAura(spell_Weakened_Soul)) - { - if (CastSpell(pmTarget, spell_PowerWord_Shield)) - { - return true; - } - } - } - if (spell_PainSuppression > 0) - { - if (CastSpell(pmTarget, spell_PainSuppression)) - { - return true; - } - } - if (spell_Penance > 0) - { - if (spell_InnerFocus > 0) - { - CastSpell(me, spell_InnerFocus); - } - if (CastSpell(pmTarget, spell_Penance)) - { - return true; - } - } - if (!pmInstantOnly) - { - if (spell_FlashHeal > 0) - { - if (CastSpell(pmTarget, spell_FlashHeal)) - { - return true; - } - } - } - } - if (targetHealthPct < 90.0f) - { - if (spell_Renew > 0) - { - if (CastSpell(pmTarget, spell_Renew, true, true)) - { - return true; - } - } - } - if (targetHealthPct < 70.0f) - { - if (spell_PowerInfusion > 0) - { - CastSpell(me, spell_PowerInfusion); - } - if (spell_PowerWord_Shield > 0) - { - if (!pmTarget->HasAura(spell_Weakened_Soul)) - { - if (CastSpell(pmTarget, spell_PowerWord_Shield)) - { - return true; - } - } - } - if (spell_Penance > 0) - { - if (CastSpell(pmTarget, spell_Penance)) - { - return true; - } - } - if (pmInstantOnly) - { - if (me->GetDistance(pmTarget) < 10.0f) - { - if (spell_HolyNova > 0) - { - if (CastSpell(me, spell_HolyNova)) - { - return true; - } - } - } - } - else - { - if (spell_GreaterHeal > 0) - { - if (CastSpell(pmTarget, spell_GreaterHeal)) - { - return true; - } - } - if (spell_Heal > 0) - { - if (CastSpell(pmTarget, spell_Heal)) - { - return true; - } - } - if (spell_LesserHeal > 0) - { - if (CastSpell(pmTarget, spell_LesserHeal)) - { - return true; - } - } - } - } - - return false; + return Heal_Holy(pmTarget, pmInstantOnly); } bool NierAction_Priest::Heal_Holy(Unit* pmTarget, bool pmInstantOnly) diff --git a/src/game/Nier/NierManager.cpp b/src/game/Nier/NierManager.cpp index 3a58ee97934..2bf3474fa26 100644 --- a/src/game/Nier/NierManager.cpp +++ b/src/game/Nier/NierManager.cpp @@ -217,6 +217,7 @@ void NierManager::UpdateNierManager(uint32 pmDiff) { if (Player* eachPlayer = eachWS->GetPlayer()) { + //NierCheck(eachPlayer); uint32 eachLevel = eachPlayer->GetLevel(); if (onlinePlayerLevelSet.find(eachLevel) == onlinePlayerLevelSet.end()) { @@ -234,6 +235,11 @@ void NierManager::UpdateNierManager(uint32 pmDiff) } } +bool NierManager::NierCheck(Player* master) +{ + return true; +} + void NierManager::UpdateNierEntities(uint32 pmDiff) { for (std::unordered_set::iterator reIT = nierEntitySet.begin(); reIT != nierEntitySet.end(); reIT++) @@ -324,10 +330,10 @@ bool NierManager::LoginNier(uint32 pmLevel, uint32 pmCount) uint32 allianceCount = addCount / 2; uint32 hordeCount = addCount - allianceCount; int checkCount = allianceCount; - int tankA = 2; + int tankA = 0; int tankH = 0; - int healerA = 0; + int healerA = 2; int healerH = 0; while (checkCount > 0) { @@ -446,6 +452,9 @@ void NierManager::CreateNier(uint32 pmLevel, bool pmAlliance, uint32 pmGroupRole { target_class = Classes::CLASS_PALADIN; target_specialty = 1; + // lfm debug priest only + target_class = Classes::CLASS_PRIEST; + target_specialty = 1; } } else if (pmGroupRole == GroupRole::GroupRole_Healer) diff --git a/src/game/Nier/NierManager.h b/src/game/Nier/NierManager.h index d4d8b21a74c..0921936d4a1 100644 --- a/src/game/Nier/NierManager.h +++ b/src/game/Nier/NierManager.h @@ -50,6 +50,7 @@ class NierManager void LogoutNiers(bool pmInstant = false); void DeleteNiers(); bool LoginNier(uint32 pmLevel, uint32 pmCount); + bool NierCheck(Player* master); bool IsPolymorphed(Unit* pmTarget); diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 4dcca80d49f..1d87fec6fb6 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1489,7 +1489,7 @@ void ObjectMgr::CheckCreatureTemplates() // lfm creature equips if (cInfo->equipment_id == 0) { - if (const EquipmentInfo* ei = ObjectMgr::GetEquipmentInfo(cInfo->entry)) + if (const EquipmentTemplate* ei = ObjectMgr::GetEquipmentTemplate(cInfo->entry)) { const_cast(cInfo)->equipment_id = cInfo->entry; }