summaryrefslogtreecommitdiff
path: root/src/map/skill-pools.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2012-12-13 16:25:50 -0800
committerBen Longbons <b.r.longbons@gmail.com>2012-12-14 16:18:22 -0800
commit069f39e8a1ebee3e4a4ce8302d0099842876782b (patch)
tree57d8de5f57d65878f8ef560e2884b9dee08e9323 /src/map/skill-pools.cpp
parentf9563edf69f083287630f4b17db70d97524196d6 (diff)
downloadtmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.tar.gz
tmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.tar.bz2
tmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.tar.xz
tmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.zip
Some formatting fixes before I go insane
Also delete the French translation from ladmin.
Diffstat (limited to 'src/map/skill-pools.cpp')
-rw-r--r--src/map/skill-pools.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/map/skill-pools.cpp b/src/map/skill-pools.cpp
index 204036d..f827427 100644
--- a/src/map/skill-pools.cpp
+++ b/src/map/skill-pools.cpp
@@ -24,14 +24,14 @@
#include "memwatch.hpp"
#endif
-int skill_pool_skills[MAX_POOL_SKILLS];
-int skill_pool_skills_size = 0;
+int skill_pool_skills[MAX_POOL_SKILLS];
+int skill_pool_skills_size = 0;
void skill_pool_register(int id)
{
if (skill_pool_skills_size + 1 >= MAX_POOL_SKILLS)
{
- fprintf (stderr,
+ fprintf(stderr,
"Too many pool skills! Increase MAX_POOL_SKILLS and recompile.");
return;
}
@@ -39,7 +39,7 @@ void skill_pool_register(int id)
skill_pool_skills[skill_pool_skills_size++] = id;
}
-const char *skill_name (int skill)
+const char *skill_name(int skill)
{
if (skill > 0 && skill < MAX_SKILL_DB)
return skill_names[skill].desc;
@@ -47,13 +47,13 @@ const char *skill_name (int skill)
return NULL;
}
-int skill_pool (struct map_session_data *sd, int *skills)
+int skill_pool(struct map_session_data *sd, int *skills)
{
- int i, count = 0;
+ int i, count = 0;
for (i = 0; count < MAX_SKILL_POOL && i < skill_pool_skills_size; i++)
{
- int skill_id = skill_pool_skills[i];
+ int skill_id = skill_pool_skills[i];
if (sd->status.skill[skill_id].flags & SKILL_POOL_ACTIVATED)
{
if (skills)
@@ -65,38 +65,38 @@ int skill_pool (struct map_session_data *sd, int *skills)
return count;
}
-void skill_pool_empty (struct map_session_data *sd)
+void skill_pool_empty(struct map_session_data *sd)
{
- int i;
+ int i;
for (i = 0; i < skill_pool_skills_size; i++)
{
- int skill_id = skill_pool_skills[i];
+ int skill_id = skill_pool_skills[i];
sd->status.skill[skill_id].flags = 0;
}
}
-int skill_pool_size (struct map_session_data *sd)
+int skill_pool_size(struct map_session_data *sd)
{
- return skill_pool (sd, NULL);
+ return skill_pool(sd, NULL);
}
-int skill_pool_max (struct map_session_data *sd)
+int skill_pool_max(struct map_session_data *sd)
{
return sd->status.skill[TMW_SKILLPOOL].lv;
}
-int skill_pool_activate (struct map_session_data *sd, int skill_id)
+int skill_pool_activate(struct map_session_data *sd, int skill_id)
{
if (sd->status.skill[skill_id].flags & SKILL_POOL_ACTIVATED)
return 0; // Already there
else if (sd->status.skill[skill_id].id == skill_id // knows the skill
- && (skill_pool_size (sd) < skill_pool_max (sd)))
+ && (skill_pool_size(sd) < skill_pool_max(sd)))
{
sd->status.skill[skill_id].flags |= SKILL_POOL_ACTIVATED;
- pc_calcstatus (sd, 0);
- MAP_LOG_PC (sd, "SKILL-ACTIVATE %d %d %d", skill_id,
- sd->status.skill[skill_id].lv, skill_power (sd,
+ pc_calcstatus(sd, 0);
+ MAP_LOG_PC(sd, "SKILL-ACTIVATE %d %d %d", skill_id,
+ sd->status.skill[skill_id].lv, skill_power(sd,
skill_id));
return 0;
}
@@ -104,39 +104,39 @@ int skill_pool_activate (struct map_session_data *sd, int skill_id)
return 1; // failed
}
-int skill_pool_is_activated (struct map_session_data *sd, int skill_id)
+int skill_pool_is_activated(struct map_session_data *sd, int skill_id)
{
return sd->status.skill[skill_id].flags & SKILL_POOL_ACTIVATED;
}
-int skill_pool_deactivate (struct map_session_data *sd, int skill_id)
+int skill_pool_deactivate(struct map_session_data *sd, int skill_id)
{
if (sd->status.skill[skill_id].flags & SKILL_POOL_ACTIVATED)
{
sd->status.skill[skill_id].flags &= ~SKILL_POOL_ACTIVATED;
- MAP_LOG_PC (sd, "SKILL-DEACTIVATE %d", skill_id);
- pc_calcstatus (sd, 0);
+ MAP_LOG_PC(sd, "SKILL-DEACTIVATE %d", skill_id);
+ pc_calcstatus(sd, 0);
return 0;
}
return 1;
}
-int skill_stat (int skill_id)
+int skill_stat(int skill_id)
{
return skill_db[skill_id].stat;
}
-int skill_power (struct map_session_data *sd, int skill_id)
+int skill_power(struct map_session_data *sd, int skill_id)
{
- int stat = skill_stat (skill_id);
- int stat_value, skill_value;
- int result;
+ int stat = skill_stat(skill_id);
+ int stat_value, skill_value;
+ int result;
- if (stat == 0 || !skill_pool_is_activated (sd, skill_id))
+ if (stat == 0 || !skill_pool_is_activated(sd, skill_id))
return 0;
- stat_value = battle_get_stat (stat, &(sd->bl));
+ stat_value = battle_get_stat(stat, &(sd->bl));
skill_value = sd->status.skill[skill_id].lv;
if ((skill_value * 10) - 1 > stat_value)
@@ -149,10 +149,10 @@ int skill_power (struct map_session_data *sd, int skill_id)
return result;
}
-int skill_power_bl (struct block_list *bl, int skill)
+int skill_power_bl(struct block_list *bl, int skill)
{
if (bl->type == BL_PC)
- return skill_power ((struct map_session_data *) bl, skill);
+ return skill_power((struct map_session_data *) bl, skill);
else
return 0;
}