* Gets the amount of blockage of a certain type. * @param type Type. * @return The blockage (0-255). */
| 166 | * @return The blockage (0-255). |
| 167 | */ |
| 168 | int MapData::getBlock(ItemDamageType type) const |
| 169 | { |
| 170 | switch (type) |
| 171 | { |
| 172 | case DT_NONE: |
| 173 | return _block[1]; |
| 174 | case DT_SMOKE: |
| 175 | return _block[3]; |
| 176 | case DT_HE: |
| 177 | case DT_IN: |
| 178 | case DT_STUN: |
| 179 | return _block[2]; |
| 180 | default: |
| 181 | break; |
| 182 | } |
| 183 | |
| 184 | return 0; |
| 185 | } |
| 186 | |
| 187 | /** |
| 188 | * Sets the amount of blockage for all types. |
no outgoing calls
no test coverage detected