paladin buff

This commit is contained in:
Yunfan Li
2023-07-15 18:17:12 +08:00
parent fce97184a2
commit 7f328b6e32

View File

@@ -3,18 +3,41 @@
*/ */
#include "PaladinActions.h" #include "PaladinActions.h"
#include "AiFactory.h"
#include "Event.h" #include "Event.h"
#include "PlayerbotAI.h"
#include "PlayerbotFactory.h"
#include "Playerbots.h" #include "Playerbots.h"
#include "SharedDefines.h" #include "SharedDefines.h"
inline std::string const GetActualBlessingOfMight(Unit* target) inline std::string const GetActualBlessingOfMight(Unit* target)
{ {
if (!target->ToPlayer()) {
return {""};
}
int tab = AiFactory::GetPlayerSpecTab(target->ToPlayer());
switch (target->getClass()) switch (target->getClass())
{ {
case CLASS_MAGE: case CLASS_MAGE:
case CLASS_PRIEST: case CLASS_PRIEST:
case CLASS_WARLOCK: case CLASS_WARLOCK:
return "blessing of wisdom"; return "blessing of wisdom";
break;
case CLASS_SHAMAN:
if (tab == SHAMAN_TAB_ELEMENTAL || tab == SHAMAN_TAB_RESTORATION) {
return "bless of wisdom";
}
break;
case CLASS_DRUID:
if (tab == DRUID_TAB_RESTORATION || tab == DRUID_TAB_BALANCE) {
return "bless of wisdom";
}
break;
case CLASS_PALADIN:
if (tab == PALADIN_TAB_HOLY) {
return "bless of wisdom";
}
break;
} }
return "blessing of might"; return "blessing of might";
@@ -22,12 +45,33 @@ inline std::string const GetActualBlessingOfMight(Unit* target)
inline std::string const GetActualBlessingOfWisdom(Unit* target) inline std::string const GetActualBlessingOfWisdom(Unit* target)
{ {
if (!target->ToPlayer()) {
return {""};
}
int tab = AiFactory::GetPlayerSpecTab(target->ToPlayer());
switch (target->getClass()) switch (target->getClass())
{ {
case CLASS_WARRIOR: case CLASS_WARRIOR:
case CLASS_ROGUE: case CLASS_ROGUE:
case CLASS_DEATH_KNIGHT: case CLASS_DEATH_KNIGHT:
case CLASS_HUNTER:
return "blessing of might"; return "blessing of might";
break;
case CLASS_SHAMAN:
if (tab == SHAMAN_TAB_ENHANCEMENT) {
return "blessing of might";
}
break;
case CLASS_DRUID:
if (tab == DRUID_TAB_FERAL) {
return "blessing of might";
}
break;
case CLASS_PALADIN:
if (tab == PALADIN_TAB_PROTECTION || tab == PALADIN_TAB_RETRIBUTION) {
return "blessing of might";
}
break;
} }
return "blessing of wisdom"; return "blessing of wisdom";