Skip to content

Commit

Permalink
pretransfer
Browse files Browse the repository at this point in the history
  • Loading branch information
jokerlfm committed May 3, 2024
1 parent f10d37b commit de984ae
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 128 deletions.
126 changes: 1 addition & 125 deletions src/game/Nier/NierActions/NierAction_Priest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 11 additions & 2 deletions src/game/Nier/NierManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand All @@ -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<NierEntity*>::iterator reIT = nierEntitySet.begin(); reIT != nierEntitySet.end(); reIT++)
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/game/Nier/NierManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/game/ObjectMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CreatureInfo*>(cInfo)->equipment_id = cInfo->entry;
}
Expand Down

0 comments on commit de984ae

Please sign in to comment.