mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
Put in braces in my new function as well as the source function.
The entire file has implied braces... I'd change them all but fear making a mistake.
This commit is contained in:
parent
561433902e
commit
b5575133cd
@ -3277,13 +3277,15 @@ void EntityList::Evade(Mob *who)
|
|||||||
void EntityList::ClearAggro(Mob* targ)
|
void EntityList::ClearAggro(Mob* targ)
|
||||||
{
|
{
|
||||||
Client *c = nullptr;
|
Client *c = nullptr;
|
||||||
if (targ->IsClient())
|
if (targ->IsClient()) {
|
||||||
c = targ->CastToClient();
|
c = targ->CastToClient();
|
||||||
|
}
|
||||||
auto it = npc_list.begin();
|
auto it = npc_list.begin();
|
||||||
while (it != npc_list.end()) {
|
while (it != npc_list.end()) {
|
||||||
if (it->second->CheckAggro(targ)) {
|
if (it->second->CheckAggro(targ)) {
|
||||||
if (c)
|
if (c) {
|
||||||
c->RemoveXTarget(it->second, false);
|
c->RemoveXTarget(it->second, false);
|
||||||
|
}
|
||||||
it->second->RemoveFromHateList(targ);
|
it->second->RemoveFromHateList(targ);
|
||||||
}
|
}
|
||||||
if (c && it->second->IsOnFeignMemory(c)) {
|
if (c && it->second->IsOnFeignMemory(c)) {
|
||||||
@ -3298,14 +3300,16 @@ void EntityList::ClearAggro(Mob* targ)
|
|||||||
void EntityList::ClearWaterAggro(Mob* targ)
|
void EntityList::ClearWaterAggro(Mob* targ)
|
||||||
{
|
{
|
||||||
Client *c = nullptr;
|
Client *c = nullptr;
|
||||||
if (targ->IsClient())
|
if (targ->IsClient()) {
|
||||||
c = targ->CastToClient();
|
c = targ->CastToClient();
|
||||||
|
}
|
||||||
auto it = npc_list.begin();
|
auto it = npc_list.begin();
|
||||||
while (it != npc_list.end()) {
|
while (it != npc_list.end()) {
|
||||||
if (it->second->IsUnderwaterOnly()) {
|
if (it->second->IsUnderwaterOnly()) {
|
||||||
if (it->second->CheckAggro(targ)) {
|
if (it->second->CheckAggro(targ)) {
|
||||||
if (c)
|
if (c) {
|
||||||
c->RemoveXTarget(it->second, false);
|
c->RemoveXTarget(it->second, false);
|
||||||
|
}
|
||||||
it->second->RemoveFromHateList(targ);
|
it->second->RemoveFromHateList(targ);
|
||||||
}
|
}
|
||||||
if (c && it->second->IsOnFeignMemory(c)) {
|
if (c && it->second->IsOnFeignMemory(c)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user