summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index 0ddb966d5..a5db3664a 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -25,12 +25,11 @@
#include "skill.h"
#include "log.h"
-static struct guild* guild_cache; //For fast retrieval of the same guild over and over. [Skotlex]
-static struct dbt *guild_db;
-static struct dbt *castle_db;
-static struct dbt *guild_expcache_db;
-static struct dbt *guild_infoevent_db;
-static struct dbt *guild_castleinfoevent_db;
+static DB guild_db;
+static DB castle_db;
+static DB guild_expcache_db;
+static DB guild_infoevent_db;
+static DB guild_castleinfoevent_db;
struct eventlist {
char name[50];
@@ -225,10 +224,7 @@ void do_init_guild(void)
// ŒŸõ
struct guild *guild_search(int guild_id)
{
- if(guild_cache && guild_cache->guild_id == guild_id)
- return guild_cache;
- guild_cache = idb_get(guild_db,guild_id);
- return guild_cache;
+ return idb_get(guild_db,guild_id);
}
int guild_searchname_sub(DBKey key,void *data,va_list ap)
{
@@ -1576,8 +1572,6 @@ int guild_broken(int guild_id,int flag)
guild_db->foreach(guild_db,guild_broken_sub,guild_id);
castle_db->foreach(castle_db,castle_guild_broken_sub,guild_id);
- if (guild_cache && guild_cache->guild_id == guild_id)
- guild_cache = NULL;
guild_storage_delete(guild_id);
idb_remove(guild_db,guild_id);
return 0;