Exported $client->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, msg) - Will be available for simple plugin use

Exported $client->ExpeditionMessage(THIS, ExpdID, Message) - In use with custom expedition mod that will be released soon
This commit is contained in:
Akkadius
2014-04-15 12:00:33 -05:00
parent 8d8b3241d1
commit 884b0291f7
4 changed files with 91 additions and 0 deletions
+27
View File
@@ -8213,3 +8213,30 @@ void Client::PlayMP3(const char* fname)
QueuePacket(outapp);
safe_delete(outapp);
}
void Client::ExpeditionSay(const char *str, int ExpID) {
char errbuf[MYSQL_ERRMSG_SIZE];
char* query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
if (!database.RunQuery(query,MakeAnyLenString(&query, "SELECT `player_name` FROM `cust_inst_players` WHERE `inst_id` = %i", ExpID),errbuf,&result)){
safe_delete_array(query);
return;
}
safe_delete_array(query);
if(result)
this->Message(14, "You say to the expedition, '%s'", str);
while((row = mysql_fetch_row(result))) {
const char* CharName = row[0];
if(strcmp(CharName, this->GetCleanName()) != 0)
worldserver.SendEmoteMessage(CharName, 0, 0, 14, "%s says to the expedition, '%s'", this->GetCleanName(), str);
// ChannelList->CreateChannel(ChannelName, ChannelOwner, ChannelPassword, true, atoi(row[3]));
}
mysql_free_result(result);
}