Update Widget.h

Translation from Widget Type ID to Widget Type Name
This commit is contained in:
Image 2020-03-18 22:42:44 -04:00
parent d04d89e32c
commit 3c0b5abeb5

View file

@ -21,6 +21,8 @@
#define __EQ2_WIDGET__
#include "Spawn.h"
#include "client.h"
#include <string.h>
using namespace std;
#define WIDGET_TYPE_GENERIC 0
#define WIDGET_TYPE_DOOR 1
@ -85,6 +87,21 @@ public:
void SetMultiFloorLift(bool val) { multi_floor_lift = val; }
bool GetMultiFloorLift() { return multi_floor_lift; }
static string GetWidgetTypeNameByTypeID(int8 type)
{
switch (type)
{
case WIDGET_TYPE_DOOR:
return string("Door");
break;
case WIDGET_TYPE_LIFT:
return string("Lift");
break;
}
return string("Generic");
}
private:
int8 widget_type;
bool include_location;