1
0
cuberite-2a/src/Items/ItemMap.h

44 lines
571 B
C
Raw Normal View History

2014-02-17 09:27:12 -05:00
// ItemMap.h
#pragma once
#include "../Entities/Entity.h"
#include "../Item.h"
class cItemMapHandler :
public cItemHandler
{
typedef cItemHandler super;
static const unsigned int DEFAULT_RADIUS = 128;
public:
cItemMapHandler() :
super(E_ITEM_MAP)
{
}
virtual void OnUpdate(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item)
{
2014-04-04 03:56:57 -04:00
cMap * Map = a_World->GetMapManager().GetMapData((unsigned)a_Item.m_ItemDamage);
2014-02-17 09:27:12 -05:00
if (Map == NULL)
{
return;
}
Map->UpdateRadius(*a_Player, DEFAULT_RADIUS);
2014-02-18 13:50:08 -05:00
Map->UpdateClient(a_Player);
2014-02-17 09:27:12 -05:00
}
} ;