MCPcopy Create free account
hub / github.com/bwapi/bwapi / affectsGameplay

Method affectsGameplay

bwapi/BWAPI/Source/BW/TriggerEngine.cpp:72–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 };
71 }
72 bool Action::affectsGameplay(DWORD dwExecutionPlayer, DWORD dwCheckingPlayer) const
73 {
74 // Ignore disabled actions
75 if ( this->bFlags & TriggerEntryFlags::IgnoreExecution )
76 return false;
77
78 // Compare the action Type and weed out what we're looking for
79 switch ( this->bActionType )
80 {
81 case Actions::CreateUnit:
82 case Actions::CreateUnitwithProperties:
83 return playerCanMatch(this->dwSourceGroup, dwExecutionPlayer, dwCheckingPlayer);
84 case Actions::GiveUnitstoPlayer:
85 return playerCanMatch(this->dwExtra, dwExecutionPlayer, dwCheckingPlayer);
86 default:
87 break;
88 }
89 return false;
90 }
91 bool Condition::canBeTrue() const
92 {
93 // Return false only if the condition will always return false, preventing trigger execution

Callers 1

actionsAllowGameplayMethod · 0.80

Calls 1

playerCanMatchFunction · 0.85

Tested by

no test coverage detected