mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-05-05 21:17:29 -05:00
Corrected Link Multi flag checks for party allocation
This commit is contained in:
parent
a74601fd60
commit
202b0fc1b3
|
|
@ -1125,17 +1125,6 @@ static inline u32 GetOpposingSideBattler(enum BattlerId battler)
|
|||
return GetBattlerAtPosition(BATTLE_OPPOSITE(GetBattlerSide(battler)));
|
||||
}
|
||||
|
||||
static inline struct Pokemon *GetSideParty(enum BattleSide side)
|
||||
{
|
||||
switch (side)
|
||||
{
|
||||
case B_SIDE_OPPONENT:
|
||||
return gParties[B_TRAINER_1];
|
||||
default:
|
||||
return gParties[B_TRAINER_0];
|
||||
}
|
||||
}
|
||||
|
||||
static inline struct PartyState *GetBattlerPartyState(enum BattlerId battler)
|
||||
{
|
||||
return &gBattleStruct->partyState[GetBattlerSide(battler)][gBattlerPartyIndexes[battler]];
|
||||
|
|
|
|||
|
|
@ -237,8 +237,8 @@ u32 BattlePalace_TryEscapeStatus(enum BattlerId battler)
|
|||
|
||||
struct Pokemon *GetBattlerParty(enum BattlerId battler)
|
||||
{
|
||||
if ((gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI))
|
||||
return GetSideParty(GetBattlerSide(battler));
|
||||
if ((gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI) && (battler & BIT_FLANK) != B_FLANK_LEFT)
|
||||
return gParties[GetAllyTrainerFromBattler(battler)];
|
||||
return gParties[GetBattlerTrainer(battler)];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user