Code:
/*guessing*/Door * GetDoorByDoorID(const *zone_name,uint32 door_id)
{/*god I hate editing code this way*/
for(uint32 i=0; i!=max_door_type;i++)
{
const Door* door = GetDoorDBID(i);
/*if door is undefined you try to dereference this=bad+crash */
//if(door == 0 || door->db_id == 0 || strcasecmp(door->zone_name, zone_name))
if(door){if(door->db_id==door_id && strcasecmp(door->zone_name, zone_name)==0)
return door;//continue;
//if(door->door_id == door_id/*this doesnt' exist*/ && strcasecmp(door->zone_name, zone_name) == 0)
//return door;}
}
return NULL;//if we don't find it
}
clean block
Code:
Door * GetDoorByDoorID(const *zone_name,uint32 door_id)
{/*god I hate editing code this way*/
for(uint32 i=0; i!=max_door_type;i++)
{
const Door* door = GetDoorDBID(i);
if(door)
{
if(door->db_id==door_id && strcasecmp(door->zone_name, zone_name)==0)
return door;
}
}
return NULL;//if we don't find it
}
Neo: read the post on the dev board about looking for new devs, then you get CVS access <3