-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathevent.cpp
More file actions
50 lines (46 loc) · 964 Bytes
/
event.cpp
File metadata and controls
50 lines (46 loc) · 964 Bytes
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
#include "event.h"
#include "window.h"
/*
Event::Event()
{
name = "nothing";
frequency = 9999999;
description = "Nothing happens.";
}
*/
Event::Event(std::string N, std::string D, int F, nc_color C, ...)
{
name = N;
frequency = F;
description = D;
base_color = C;
va_list args;
va_start(args, C);
int buff;
bool done = false;
do {
buff = va_arg(args, int);
if (buff != 0) {
Price_modifier mod;
mod.good = Good_id(buff);
buff = va_arg(args, int);
mod.planet_id = buff;
buff = va_arg(args, int);
mod.static_change = buff;
buff = va_arg(args, int);
mod.percent_change = buff;
buff = va_arg(args, int);
mod.supply_change = buff;
buff = va_arg(args, int);
mod.demand_change = buff;
buff = va_arg(args, int);
mod.timeout = buff;
modifiers.push_back(mod);
} else {
done = true;
}
} while (!done);
}
Event::~Event()
{
}