Browse Source

Move documentation from implementations to declarations #2735 (#2782)

pull/2786/head
Siddharth singh chouhan 5 years ago committed by GitHub
parent
commit
18125aac6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      Source/spells.cpp
  2. 13
      Source/spells.h

11
Source/spells.cpp

@ -185,13 +185,6 @@ void UseMana(int id, spell_id sn)
}
}
/**
* @brief Ensures the player's current readied spell is a valid selection for the character. If the current selection is
* incompatible with the player's items and spell (for example, if the player does not currently have access to the spell),
* the selection is cleared.
* @note Will force a UI redraw in case the values actually change, so that the new spell reflects on the bottom panel.
* @param player The player whose readied spell is to be checked.
*/
void EnsureValidReadiedSpell(Player &player)
{
if (!IsReadiedSpellValid(player)) {
@ -248,10 +241,6 @@ void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, int spllvl)
}
}
/**
* @param pnum player index
* @param rid target player index
*/
void DoResurrect(int pnum, uint16_t rid)
{
if (pnum == MyPlayerId) {

13
Source/spells.h

@ -19,8 +19,21 @@ enum class SpellCheckResult : uint8_t {
int GetManaAmount(Player &player, spell_id sn);
void UseMana(int id, spell_id sn);
SpellCheckResult CheckSpell(int id, spell_id sn, spell_type st, bool manaonly);
/**
* @brief Ensures the player's current readied spell is a valid selection for the character. If the current selection is
* incompatible with the player's items and spell (for example, if the player does not currently have access to the spell),
* the selection is cleared.
* @note Will force a UI redraw in case the values actually change, so that the new spell reflects on the bottom panel.
* @param player The player whose readied spell is to be checked.
*/
void EnsureValidReadiedSpell(Player &player);
void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, int spllvl);
/**
* @param pnum player index
* @param rid target player index
*/
void DoResurrect(int pnum, uint16_t rid);
void DoHealOther(int pnum, uint16_t rid);
int GetSpellBookLevel(spell_id s);

Loading…
Cancel
Save