[2771] Applied MaNGOS coding style (see trunk/bcpp.cfg).
[mangos-git.git] / src / game / RedZoneDistrict.h
blob2bdcc22f8340861bc668830fbb91b714b46697be
1 /*
2 * Copyright (C) 2005,2006 MaNGOS <http://www.mangosproject.org/>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef MANGOS_REDZONEDISTRICT_H
20 #define MANGOS_REDZONEDISTRICT_H
22 #include "GridDefines.h"
23 #include "Cell.h"
25 struct MANGOS_DLL_DECL RedZone
27 void initialize(const uint32 &grid_x, const uint32 &grid_y, const uint32 &cell_x, const uint32 &cell_y)
29 i_cell.data.Part.grid_x = (unsigned)(grid_x);
30 i_cell.data.Part.grid_y = (unsigned)(grid_y);
31 i_cell.data.Part.cell_x = (unsigned)(cell_x);
32 i_cell.data.Part.cell_y = (unsigned)(cell_y);
33 i_cell.data.Part.reserved = 0;
36 operator const Cell &(void) const { return i_cell; }
37 operator Cell &(void) { return i_cell; }
38 Cell i_cell;
40 static const Cell& GetZone(const CellPair &p) { return si_RedZones[p.x_coord][p.y_coord]; }
41 static RedZone si_RedZones[MAX_NUMBER_OF_GRIDS*MAX_NUMBER_OF_CELLS][MAX_NUMBER_OF_GRIDS*MAX_NUMBER_OF_CELLS];
42 static void Initialize(void);
44 #endif