This repository has been archived by the owner on Dec 18, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvgm_medals.cpp
61 lines (58 loc) · 1.52 KB
/
vgm_medals.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "vgm_player.h"
#include "vgm_medals.h"
vMedalManager *vMManager;
char *AwardNames[37] = {
{ "Kill Spree" },
{ "Kill Frenzy" },
{ "Running Riot" },
{ "Untouchable" },
{ "Headshot Spree (500)" },
{ "Headshot Spree (1000)" },
{ "Splatter Spree" },
{ "Double Kill" },
{ "Triple Kill" },
{ "Overkill" },
{ "Killtacular" },
{ "Killtrocity" },
{ "Killamanjaro" },
{ "Killtastrophe" },
{ "Killpocalypse" },
{ "Killionaire" },
{ "Ion Kill" },
{ "Nuke Kill" },
{ "Tiberium Kill" },
{ "Timed Kill" },
{ "Team Kill" },
{ "Incineration" },
{ "Kill Joy" },
{ "Carjack" },
{ "Hijack" },
{ "Perfection" },
{ "Rampage" },
{ "Wrecking Ball" },
{ "Dynamite Expert" },
{ "Demolition Man" },
{ "Atom Blaster" },
{ "Destroyer of Worlds" },
{ "Deconstructivist" },
{ "Air Suicide" },
{ "Harvester Suicide" },
{ "Tiberium Suicide" },
{ "C4 Junkie" }
};
void vMedalManager::Init() {
vPManager->Clear_All_Medals();
}
void vMedalManager::Got_Medal(const char *nick, vMedalType Type, bool Notify) {
if (Config->MedalsEnabled == false) { return; }
vPlayer *p = vPManager->Get_Player(nick);
if (p) {
Stewie_cPlayer *player = Stewie_cPlayerManager::Find_Player(p->ID);
if (!player || stricmp(WCharToStr(player->PlayerName.m_Buffer).c_str(),nick)) { Notify = false; }
if (Notify) { PrivMsgColoredVA(p->ID,2,0,200,200,"[VGM] Received '%s' achievement.",AwardNames[Type]); }
p->Medals[(int)Type]++;
}
}
void vMedalManager::Got_Medal(int ID, vMedalType Type, bool Notify) {
Got_Medal(Player_Name_From_ID(ID).c_str(),Type,Notify);
}