| 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 |
no test coverage detected