[sylverant] r771 committed - Fix minor bug.

2 views
Skip to first unread message

sylv...@googlecode.com

unread,
Dec 31, 2014, 6:55:23 PM12/31/14
to sylverant-...@googlegroups.com
Revision: 771
Author: bluecrab
Date: Wed Dec 31 23:55:00 2014 UTC
Log: Fix minor bug.


https://code.google.com/p/sylverant/source/detail?r=771

Modified:
/trunk/shipgate/src/ship.c

=======================================
--- /trunk/shipgate/src/ship.c Mon Dec 29 21:20:16 2014 UTC
+++ /trunk/shipgate/src/ship.c Wed Dec 31 23:55:00 2014 UTC
@@ -3102,12 +3102,13 @@
if(!ct || pkt->episode != ev->monsters[i].episode)
continue;

- sprintf(query, "INSERT INTO monster_kills (account_id,
guildcard, "
- "episode, difficulty, enemy, count) VALUES('%"
PRIu32 "', "
- "'%" PRIu32 "', '%u', '%u', '%d', '%" PRIu32"') ON "
- "DUPLICATE KEY UPDATE count=count+VALUES(count)", acc,
gc,
+ sprintf(query, "INSERT INTO monster_kills (event_id,
account_id, "
+ " guildcard, episode, difficulty, enemy, count)
VALUES('%"
+ PRIu32 "', '%" PRIu32 "', '%"
PRIu32 "', '%u', '%u', '%d', "
+ "'%" PRIu32"') ON DUPLICATE KEY UPDATE "
+ "count=count+VALUES(count)", ev->event_id, acc, gc,
(unsigned int)pkt->episode, (unsigned
int)pkt->difficulty,
- i, ct);
+ ev->monsters[i].monster, ct);

/* Execute the query */
if(sylverant_db_query(&conn, query)) {
@@ -3127,12 +3128,13 @@
if(!ct)
continue;

- sprintf(query, "INSERT INTO monster_kills (account_id, guildcard, "
- "episode, difficulty, enemy, count) VALUES('%" PRIu32 "', "
- "'%" PRIu32 "', '%u', '%u', '%d', '%" PRIu32"') ON
DUPLICATE "
- "KEY UPDATE count=count+VALUES(count)", acc, gc,
- (unsigned int)pkt->episode, (unsigned int)pkt->difficulty,
i,
- ct);
+ sprintf(query, "INSERT INTO monster_kills (event_id, account_id, "
+ " guildcard, episode, difficulty, enemy, count) VALUES('%"
+ PRIu32 "', '%" PRIu32 "', '%"
PRIu32 "', '%u', '%u', '%d', "
+ "'%" PRIu32"') ON DUPLICATE KEY UPDATE "
+ "count=count+VALUES(count)", ev->event_id, acc, gc,
+ (unsigned int)pkt->episode, (unsigned int)pkt->difficulty,
+ i, ct);

/* Execute the query */
if(sylverant_db_query(&conn, query)) {
Reply all
Reply to author
Forward
0 new messages