Update Widget.h
Translation from Widget Type ID to Widget Type Name
This commit is contained in:
parent
d04d89e32c
commit
3c0b5abeb5
1 changed files with 17 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue