Quote:
Originally Posted by trevius
It could pull the values from a comma separated input something like:
Code:
cancoth
2,0,0,0,50,50,25
|
I personally think adding a table to the database for this would be better than using a text file. The only somewhat difficult part may be for areas that you want to block off that you don't really want rectangular for whatever reason. In reality though, it just means more entries in the database.
Then again, I think this could be taken a step further: why just CotH, Lev, & SoW manually blocked in the code? Why not make it apply to any spell you want?
Just thinking out loud, you could define a table, maybe blocked_spells, with the spell id, type of block (using 1 & 2 like you suggested), zone id, and coordinates/sizes. Here would be an example:
Code:
| id | spellid | type | zoneid | x | y | z | l | w | h |
|----+---------+------+--------+------+------+------+------+------+------|
| 1 | 1771 | 1 | 71 | NULL | NULL | NULL | NULL | NULL | NULL |
| 2 | 1771 | 2 | 202 | 978 | 0 | 425 | 50 | 50 | 35 |
This would block CotH from being used in airplane at all & poknowledge in the library tower.
In the code, you could then just run a check when the spell is cast to see if the spell is restricted in the table, and then if you are standing in the coordinates if they are defined. If you are, return false (causing the spell not to be cast) w/ an client that you can use that spell there. Hell, you could just define a message to the client in the same table.
Thoughts?