[Mercenaries] Convert Mercenaries to Repositories (#3947)

* [Mercenaries] Convert Mercenaries to Repositories

- Convert all Mercenary methods to repositories aside from inner join queries that cannot be converted.

* Update base_merc_subtypes_repository.h

* Update base_merc_subtypes_repository.h

* Regenerate repositories
This commit is contained in:
Alex King authored and GitHub committed 2024-01-12 23:40:26 -06:00
1 parent 32659426ba
commit d7dc717249
33 files changed
+1866 -735

No files matched your search

+4 -4
View File
@@ -3036,12 +3036,12 @@ void Mob::AddToHateList(Mob* other, int64 hate /*= 0*/, int64 damage /*= 0*/, bo
// if other is a merc, add the merc client to the hate list
if (other->IsMerc()) {
if (other->CastToMerc()->GetMercOwner() && other->CastToMerc()->GetMercOwner()->CastToClient()->GetFeigned()) {
AddFeignMemory(other->CastToMerc()->GetMercOwner()->CastToClient());
if (other->CastToMerc()->GetMercenaryOwner() && other->CastToMerc()->GetMercenaryOwner()->CastToClient()->GetFeigned()) {
AddFeignMemory(other->CastToMerc()->GetMercenaryOwner()->CastToClient());
}
else {
if (!hate_list.IsEntOnHateList(other->CastToMerc()->GetMercOwner()))
hate_list.AddEntToHateList(other->CastToMerc()->GetMercOwner(), 0, 0, false, true);
if (!hate_list.IsEntOnHateList(other->CastToMerc()->GetMercenaryOwner()))
hate_list.AddEntToHateList(other->CastToMerc()->GetMercenaryOwner(), 0, 0, false, true);
// if mercs are reworked to include adding 'this' to owner's xtarget list, this should reflect bots code above
}
} //MERC