Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 07.07.2007, 22:52   #24
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

Guaresnay:
1. why you're getting itemnames through sql and not simply parse item_pch?
Code:
foreach(file("item_pch.txt") as $iitem){
	str_replace(array("\xFF\xFE","\x00"),"",trim($iitem));
	$iitem=str_replace(array(" ","\t"),"",$iitem);
	$eitem=explode("=",$iitem);
	$itemids[($eitem[1])]=str_replace(array("[","]"),"",$eitem[0]);
}
// after that you may use for example $itemids[1], it returns short_sword.
as you see, there is many citizen classes. why not set as there:
Code:
function get_type($type){
	switch($type){
		...
		default:
			$type="citizen";break; //every case need to break, or switch will continue from begining, you forgot about it.
	}
	return $type;
}
the $type=$type is wrong. it will cause l2server parsing problems.
hel is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:08.