Thank you sir.
Quote:
If there's nothing left to process in the function after your 'else if' and the exclusion can be caught with an 'else' or another 'else if' statement, you can simply handle it with a 'return' statement.
|
I understand this.
Quote:
Otherwise, you might consider putting your post-con check code inside of a single con check that meets all of the requirements for that code to be processed.
|
I'm a little fuzzy on this.
I can't find it but I thought I saw an instance where <else> was used with nothing between { } except spaces.
EDIT: Here but this may not apply to my issue.
Code:
else {
if (!GetFeigned() && (DistanceSquared(bindmob->GetPosition(), m_Position) <= 400)) {
// send bindmob bind done
if(!bindmob->IsAIControlled() && bindmob != this ) {
}
else if(bindmob->IsAIControlled() && bindmob != this ) {
// Tell IPC to resume??
}
else {
// Binding self
}
// Send client bind done
bind_out->type = 1; // Done
QueuePacket(outapp);
bind_out->type = 0;
CheckIncreaseSkill(SkillBindWound, nullptr, 5);
int maxHPBonus = spellbonuses.MaxBindWound + itembonuses.MaxBindWound + aabonuses.MaxBindWound;