1158 lines
59 KiB
C
1158 lines
59 KiB
C
#include "version.h"
|
||
#include <stdio.h>
|
||
|
||
#include "char_base.h"
|
||
#include "char.h"
|
||
#include "object.h"
|
||
#include "readmap.h"
|
||
#include "map_deal.h"
|
||
#include "lssproto_serv.h"
|
||
#include "handletime.h"
|
||
#include "pet.h"
|
||
#include "battle.h"
|
||
#include "petmail.h"
|
||
#include "log.h"
|
||
#include "function.h"
|
||
#include "pet_skill.h"
|
||
|
||
|
||
/*
|
||
* 訶湛旣醴 긷橈豚墩칫∋뎀
|
||
*/
|
||
/*------------------------------------------------------------------------
|
||
* 訶湛旣챘ⓣ뭅奭犢周뺏墩[렇逕湛븍暘[
|
||
* CHAR那卵 긷섟懃履纛쏟컁墩[
|
||
* 犢걋“履纛쏟컁禁틱텀력index 좍 “-1
|
||
*-----------------------------------------------------------------------*/
|
||
char hanzibuf[5000][8] = {"각","가","갊","갉","갇","갓","갖","강","갛","갤","객","갭","갠","갰","걋","걍","걔","검","것","건","걸","겁","겄","겉","겋","겔","겐","게","겜","겟","겝","겠","겨","격","겯","겹","견","결","겼","경","곗",
|
||
"곕","곈","곁","계","곌","곤","곬","골","곪","공","곯","관","곽","괍","괜","괘","괏","광","괩","괠","괬","괵","괸","굄","괼","굇","굔","구","교","굡","굳","굉","굴","굶","굻","궂","궉","권","궐","궤","궝",
|
||
"궜","귑","극","귄","균","귈","그","궷","귁","귿","긁","글","긋","긍","급","기","긱","긴","깁","길","긺","김","깃","깊","깎","깟","깝","깥","깡","깩","깨","깰","깻","깹","꺅","꺼","깼","괆","껑","깽","꺄",
|
||
"껍","껨","껜","꺽","껀","께","괌","껭","껸","껫","꼇","꼈","꼍","꼭","꼬","꼰","꼲","꼽","꼼","꼿","꼴","꽃","꽈","꽁","꽂","꽉","꽝","꽜","꽥","꽤","꽹","꾀","꾄","꾑","꾈","꾐","꾜","꾸","꾼","꿇","꿍",
|
||
"꿋","꿈","꿎","꿉","꿔","꿩","꿨","꿴","꿱","뀁","뀄","뀌","뀔","뀜","끈","끌","끓","끎","끕","끗","낀","낌","끼","낄","끽","낍","끝","낏","낑","낙","나","난","낟","낚","날","낢","납","낫","났","낭","낱",
|
||
"낮","낼","낵","냇","낸","냈","냄","눴","냐","냔","냉","냑","냥","너","넓","넒","냘","넉","넌","넋","넛","넜","넴","넨","넣","넥","네","넹","넷","넵","년","녀","녁","념","녑","녔","녕","녜","놈","놉","놀",
|
||
"논","놂","녠","농","높","놔","놓","뇜","놜","뇌","뇟","뇨","뇝","뇹","뇰","夔","뇽","누","눈","눋","눌","눔","눕","눗","눠","눼","뉘","뉜","뉩","뉨","뉴","늉","늄","느","늦","늣","늡","늚","늪","늴","늬",
|
||
"닒","닐","닉","니","님","닙","닛","다","닝","단","닭","닫","닮","답","닷","닸","당","댄","鄧","댈","댐","댑","댔","댕","댜","덜","던","덤","덧","덞","덟","덥","덖","덮","데","덫","덩","델","뎀","뎃","뎌",
|
||
"뎐","뎅","뎔","뎠","뎡","뎨","뎬","도","독","渗","돔","돎","돌","돋","돕","동","돝","돛","돗","돤","돠","돨","됐","되","된","됨","됴","됫","두","둔","둘","뒀","둬","뒈","뒬","뒨","뒵","뒤","뒹","듕","듐",
|
||
"든","듦","득","등","디","딕","딤","딥","딧","딜","딩","딨","딸","따","땀","땃","땁","땄","땅","땐","땍","땔","땜","땝","땟","땠","땡","떨","떠","떪","떼","떱","떰","떳","떴","떵","떽","뗀","뗍","뗌","뗏",
|
||
"뗑","뗘","또","똑","똔","똥","똬","뙈","뙤","뙨","똴","뚜","뚠","뚤","뚬","뚱","뜀","뛰","뜩","뜬","뜸","뜰","띈","띠","띔","띨","띳","랄","람","랏","랍","랐","랗","랙","랩","램","랜","랫","랬","략","랸",
|
||
"럇","럴","럼","런","럽","럿","렇","렉","레","렀","렁","렘","렌","렐","렝","려","렛","력","련","렬","렴","령","렷","례","롄","록","론","로","롤","롸","롯","롼","롬","뢍","뢴","룀","뢸","룃","룅","료","루",
|
||
"룐","룩","룟","룡","룝","룰","룹","룻","뤄","룽","뤘","뤠","뤼","륀","률","륌","륩","륨","륫","륜","류","르","름","리","릊","릇","릅","릭","만","마","맘","맏","맒","맛","릿","린","릴","링","말","많","림",
|
||
"맡","맣","맨","맬","매","맴","맵","맷","맺","맹","먈","먀","먕","먁","먹","먼","멋","멉","멂","멀","멍","멎","멕","멘","멤","멥","멨","멩","며","몄","몃","몇","면","멱","몬","몌","목","모","몰","몸","몹",
|
||
"못","몽","뫄","뫘","뫈","묏","묶","무","묘","묑","묩","묵","묜","묫","문","묾","묽","뭅","뭇","뭄","뭍","뭐","뭔","뭘","뮌","뮨","뮤","뭡","뮴","믄","믈","므","뮬","미","믐","믓","믿","민","밈","밋","밌",
|
||
"밍","밑","밖","바","박","반","밗","밞","발","밝","받","밟","밤","백","밴","방","뱀","뱁","뱉","뱍","뱅","뱌","버","벅","번","벌","벎","범","법","벗","벚","베","벧","벵","벽","별","볶","복","볕","봄","봐",
|
||
"봉","봤","뵀","뵈","봬","뵌","뵤","북","부","뵨","붉","뵙","뵐","분","붕","붚","붜","붤","붰","붸","뷩","뷘","뷜","뷰","뷴","뷸","븐","브","븅","븀","블","븝","븟","빈","비","빅","빎","빌","빔","빠","빚",
|
||
"빗","빤","빡","빛","빪","빳","빵","빱","빻","빽","빼","뺄","뺀","뺏","뺍","뺌","뺐","뺙","뺑","뻐","뻑","뻘","뻔","뻠","뼙","뻥","뻣","뻤","뼛","뼜","뽈","뼝","뽕","뾔","뿌","뿍","뿟","뿐","뿔","쀼","쁘",
|
||
"삠","삔","삥","삐","쁨","쁑","쁜","삭","삯","삳","산","살","삶","삽","삼","샀","새","삿","색","상","샌","샨","샐","샙","샥","샷","샬","생","샘","섀","샴","섟","섈","섬","섦","섐","선","섣","섞","석","섯",
|
||
"성","섭","섰","셕","션","셩","셤","세","셥","셉","센","셜","셌","셨","셍","속","셸","솅","소","셰","솖","송","솨","솥","솝","솩","솟","쇤","쇄","솽","솬","쇌","쇘","쇠","쇗","솰","쇔","숀","숍","쇰","숄",
|
||
"숑","숏","쇱","숌","숨","숭","쉔","숲","수","술","숯","숱","쉈","숟","순","숩","숫","쉭","쉠","쉥","쉬","쉘","쉰","쉿","쉽","쉼","슁","슉","슈","슥","슨","슴","슬","슭","스","슘","슝","슐","실","싣","십",
|
||
"싫","신","슷","심","싻","싸","싹","싱","쌓","얾","얻","습","엊","엌","엇","었","에","엥","역","쌉","쌈","쌀","쌍","쌘","쌕","쌤","썅","써","쌥","쌔","쌩","썬","썩","썽","썰","쎌","썹","썼","쏀","쏟","쏙",
|
||
"쏜","쏠","쏘","쏭","쏨","쏴","쏩","쐴","쐼","쐤","쏵","쐈","쐰","쐐","쑴","쒔","쑤","쑵","쑨","쑥","쑹","쒜","쓩","쒼","쒸","씐","쓺","씌","씁","쓴","쓱","쓰","쓸","씬","씩","씨","씽","씹","아","앉","안",
|
||
"앎","알","앙","압","암","애","앞","旴","앨","앤","얌","앵","앳","야","얇","양","얍","앴","약","얄","앱","얕","얩","얜","어","엄","없","열","엶","엷","염","엿","였","영","옆","옇","예","옐","옘","옛","옜",
|
||
"옰","올","옮","옳","옴","옵","옷","옹","옻","와","왁","완","왐","왑","왓","왕","왝","왜","왠","왯","왱","외","왹","왼","욈","욋","욍","욉","요","욕","욘","욜","욥","우","욱","운","욹","욺","워","웅","웁",
|
||
"움","웍","웝","웬","웹","웽","위","윈","윅","윔","윕","윗","율","윙","육","유","윤","윱","윳","읊","윽","으","융","은","응","읒","읔","읕","읠","의","읜","읨","읫","이","익","인","일","읾","입","있","잇",
|
||
"잉","잖","잠","잚","작","잤","장","잦","잴","잼","재","嘲","젝","잭","쟉","쟀","쟁","잿","제","저","쟤","접","쟝","적","쟨","절","젖","쟘","젓","젤","젯","졈","젼","젭","젬","져","젱","졌","족","조","졔",
|
||
"졍","좁","졸","졺","존","좀","좃","좋","좌","종","좆","좼","좟","좝","죄","죕","죗","죡","죠","죤","죙","줅","주","줄","줌","쥘","쥣","쥰","쥔","쥬","쥐","쥑","쥴","즈","쥼","즉","증","직","즛","즐","진",
|
||
"짇","질","집","짊","징","짖","짙","짜","짠","짤","쨋","짬","짱","짼","쨀","쩍","쩌","쨔","쫀","쨉","쨌","쩔","쫴","쬠","쭈","쬡","쭌","쭐","쭘","쭁","쭹","쭸","쭝","쮜","쮸","쯩","쯤","쯧","찌","찐","찔",
|
||
"찜","쩠","쩨","쪼","쪄","쪽","쫄","쫓","쫘","쫙","쫠","찢","찝","찡","찧","찬","착","차","찮","찹","찻","챈","창","채","찾","챔","챘","챙","챕","챦","챨","처","챰","챵","척","청","체","첨","첬","첫","첼",
|
||
"쳄","쳉","쳔","쳤","쳬","쳰","촉","촐","촁","촙","촘","촬","촹","쵠","촛","쵤","쵱","쵯","추","축","춈","출","춤","충","춰","췄","취","췸","췰","췻","췹","췽","츌","츰","츠","츤","츱","층","친","칟","칡",
|
||
"칠","침","칩","칫","칸","칭","칼","카","칵","캇","캐","캡","캘","컁","커","컨","캣","캥","캭","캤","컬","컴","코","컸","케","켄","켈","켐","켕","켓","켜","켠","켤","켭","켬","켯","켱","콕","콘","콩","콧",
|
||
"콱","쾀","쾨","쿡","쿤","쿨","쿰","쿱","쿳","퀭","퀼","퀸","큇","큉","큔","크","큠","큭","큰","클","큼","큽","킁","킨","킹","탉","근","탓","탔","태","탠","탬","탰","탱","턍","털","턺","턱","텀","텃","텅",
|
||
"테","텔","템","텝","텟","톈","텬","톄","톡","토","톨","톰","툉","퇘","퇀","툇","투","툭","툽","툿","퉁","튄","튁","튀","튈","튑","튬","튤","튠","튱","특","트","튿","틀","틈","틋","틔","틜","틱","팀","틴",
|
||
"틥","틸","티","팃","팅","팍","팔","팎","판","팜","팠","팝","팟","팥","팰","팹","팼","펌","펄","펀","퍅","퍼","펏","펭","페","펜","폄","펙","펴","평","폐","폈","폘","폅","폭","폴","폼","폣","포","퐈","퐝",
|
||
"푤","푭","푀","푠","푹","푯","품","풀","풂","풉","풍","풋","퓐","퓔","퓜","퓨","퓻","퓰","퓽","픔","플","픈","피","픽","픕","픗","핀","학","한","할","함","항","핫","핼","핵","햅","핸","행","햐","허","헌",
|
||
"袗","헙","헒","헛","헝","헤","헨","헴","헬","헹","헷","혐","혓","혜","형","혈","혠","혤","혼","혹","홀","홍","홈","홋","화","확","활","환","홧","홱","회","횅","홴","획","횐","횔","횝","횡","횹","횬","횻",
|
||
"후","훅","훈","훌","훑","훙","훗","훠","훵","훰","훨","휀","휄","휑","휴","휠","휭","휩","휨","휼","휸","흄","흔","흗","흖","흙","흡","희","흩","흴","흼","흽","힁","히","힘","힙","힛","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>",
|
||
"<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>",
|
||
"<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","價","<EFBFBD>","伽","加","佳","假","暇","呵","可","家","嘉","哥","嫁","枷","痂","柯","珂","街","茄","歌","苛","稼","袈","賈","迦",
|
||
"軻","却","幹","各","懇","刻","駕","慤","奸","覺","柬","桿","干","杆","角","恪","刊","脚","姦","珏","澗","癎","磵","看","稈","肝","艱","簡","竿","艮","蝎","碣","喝","乫","褐","竭","渴","諫","坎","嵌","柑",
|
||
"橄","堪","減","監","甘","疳","紺","鑒","岬","甲","鉀","胛","閘","剛","姜","崗","岡","康","强","彊","江","慷","糠","綱","客","介","鱇","降","鋼","薑","襁","价","愷","凱","慨","改","個","漑","芥","豈","箇",
|
||
"盖","鎧","開","坑","粳","据","據","羹","醵","拒","居","擧","渠","炬","祛","踞","鋸","鉅","乾","建","愆","楗","鍵","杰","乞","傑","劒","儉","劍","桀","檢","劫","憩","偈","格","檄","揭","隔","覡","牽","犬",
|
||
"見","絹","譴","遣","潔","結","決","缺","鉗","慊","訣","謙","鎌","京","俓","儆","傾","勍","勁","卿","徑","庚","憬","慶","境","擎","敬","景","梗","更","炅","璟","瓊","痙","硬","竟","耿","經","競","莖","警",
|
||
"逕","鏡","輕","鯨","係","契","季","屆","悸","戒","桂","癸","磎","界","稽","系","繫","谿","繼","階","古","固","叩","呱","姑","孤","庫","尻","拷","故","敲","暠","枯","沽","槁","痼","皐","睾","稿","考","股",
|
||
"苦","藁","蠱","袴","辜","賈","錮","鼓","斛","坤","穀","鵠","崑","昆","梱","棍","琨","袞","滑","供","鯤","汨","共","功","公","拱","攻","空","珙","貢","鞏","果","戈","串","寡","誇","瓜","菓","槨","鍋","跨",
|
||
"顆","郭","寬","慣","棺","官","括","灌","貫","瓘","管","罐","菅","恝","侊","匡","廣","壙","光","洸","狂","筐","罫","乖","怪","塊","壞","魁","宏","拐","肱","轟","喬","巧","敎","橋","嶠","狡","校","蕎","蛟",
|
||
"膠","轎","較","絞","坵","鮫","俱","句","驕","口","勾","咎","垢","區","廐","具","寇","嘔","構","柩","枸","求","毆","狗","溝","玖","灸","瞿","球","臼","舊","究","苟","購","謳","衢","鉤","邱","駒","軀","銶",
|
||
"國","菊","鳩","驅","鷗","鞠","鞫","麴","群","君","窟","掘","堀","屈","軍","郡","窘","券","宮","窮","芎","圈","卷","權","捲","拳","蕨","眷","淃","蹶","獗","厥","硅","窺","葵","逵","勻","閨","赳","糾","畇",
|
||
"橘","克","菌","劇","筠","剋","懃","僅","隙","劤","戟","斤","菫","槿","瑾","覲","契","近","謹","今","擒","檎","妗","昑","禁","琴","禽","衿","襟","金","錦","伋","及","汲","給","級","扱","伎","肯","矜","其",
|
||
"冀","埼","圻","岐","崎","妓","嗜","忌","技","旗","朞","氣","欺","汽","沂","璣","畿","琪","璂","琦","潰","晷","句","饋","鬼","貴","龜","槻","叫","揆","祁","祇","祺","箕","耆","紀","綺","羈","記","肌","豈",
|
||
"飢","錤","饑","驥","緊","佶","儺","拮","喇","喫","懶","懦","桔","吉","金","奈","拿","癩","蘿","那","諾","螺","駱","落","洛","邏","卵","亂","欄","爛","鸞","捺","煖","捏","嵐","楠","南","枏","湳","襤","藍",
|
||
"男","衲","囊","納","蠟","廊","浪","狼","篤","惇","敦","禿","督","暾","焞","豚","凍","頓","郎","奈","冷","耐","柰","撚","秊","女","拈","捻","寧","擄","努","弩","老","露","駑","盧","瑙","虜","菉","綠","鹿",
|
||
"碌","祿","鷺","屢","聾","壘","論","累","腦","嫩","膿","陋","弄","磊","樓","縷","雷","尿","訥","凜","綾","能","稜","陵","多","匿","茶","丹","壇","亶","但","團","短","簞","檀","湍","端","緞","鄲","袒","澾",
|
||
"撻","達","湛","擔","曇","澹","淡","痰","膽","覃","蕁","談","譚","畓","錟","答","踏","堂","唐","棠","塘","當","撞","黨","貸","岱","戴","隊","臺","擡","大","垈","宅","倒","德","到","黛","刀","圖","搗","導",
|
||
"掉","棹","渡","堵","挑","徒","淘","島","悼","桃","睹","禱","逃","蹈","覩","途","賭","鍍","都","陶","瀆","牘","毒","獨","墩","仝","冬","憧","棟","東","洞","潼","疼","瞳","童","董","銅","斗","杜","枓","痘",
|
||
"豆","讀","逗","遯","遁","芚","鈍","屯","橙","嶝","燈","得","登","等","藤","騰","拏","喇","羅","螺","裸","珞","樂","落","酪","駱","丹","亂","爛","瀾","鸞","嵐","蘭","辣","欖","濫","籃","蠟","覽","朗","廊",
|
||
"狼","螂","琅","郞","崍","徠","冷","梁","兩","略","亮","倆","樑","屢","淚","漏","瘻","縷","鏤","陋","柳","榴","旒","粮","粱","諒","侶","儷","櫚","濾","礪","勵","廬","閭","藜","黎","驪","麗","驢","轢","瀝",
|
||
"曆","歷","唱","力","憐","攣","聯","練","漣","璉","裂","連","烈","蓮","輦","列","廉","劣","洌","冽","獵","伶","殮","令","斂","濂","簾","岺","怜","玲","囹","笭","寧","逞","羚","齡","靈","撈","醴","澧","鈴",
|
||
"例","零","櫓","瀘","老","爐","虜","蘆","露","路","鹵","魯","鷺","碌","綠","壟","弄","論","朧","聾","瓏","瀧","瀨","儡","籠","賂","賚","磊","寮","賴","僚","遼","燎","鬧","壘","料","龍","廖","蓼","聊","婁",
|
||
"瀏","硫","謬","戮","輪","崙","淪","凌","率","栗","隆","綾","凜","俚","菱","唎","厘","吏","悧","李","浬","犁","理","璃","痢","羸","莉","籬","裏","里","離","鯉","釐","吝","潾","燐","璘","鱗","麟","林","각",
|
||
"가","갊","갉","갇","갓","갖","강","갛","갤","객","갭","갠","갰","걋","걍","걔","검","것","건","걸","겁","겄","겉","겋","겔","겐","게","겜","겟","겝","겠","겨","격","겯","겹","견","결","겼","경","곗","곕",
|
||
"곈","곁","계","곌","곤","곬","골","곪","공","곯","관","곽","괍","괜","괘","괏","광","괩","괠","괬","괵","괸","굄","괼","굇","굔","구","교","굡","굳","굉","굴","굶","굻","궂","궉","권","궐","궤","궝","궜",
|
||
"귑","극","귄","균","귈","그","궷","귁","귿","긁","글","긋","긍","급","기","긱","긴","깁","길","긺","김","깃","깊","깎","깟","깝","깥","깡","깩","깨","깰","깻","깹","꺅","꺼","깼","괆","껑","깽","꺄","껍",
|
||
"껨","껜","꺽","껀","께","괌","껭","껸","껫","꼇","꼈","꼍","꼭","꼬","꼰","꼲","꼽","꼼","꼿","꼴","꽃","꽈","꽁","꽂","꽉","꽝","꽜","꽥","꽤","꽹","꾀","꾄","꾑","꾈","꾐","꾜","꾸","꾼","꿇","꿍","꿋",
|
||
"꿈","꿎","꿉","꿔","꿩","꿨","꿴","꿱","뀁","뀄","뀌","뀔","뀜","끈","끌","끓","끎","끕","끗","낀","낌","끼","낄","끽","낍","끝","낏","낑","낙","나","난","낟","낚","날","낢","납","낫","났","낭","낱","낮",
|
||
"낼","낵","냇","낸","냈","냄","눴","냐","냔","냉","냑","냥","너","넓","넒","냘","넉","넌","넋","넛","넜","넴","넨","넣","녔","녕","녜","놈","놉","놀","논","놂","녠","농","높","놔","놓","뇜","놜","뇌","뇟",
|
||
"뇨","뇝","뇹","뇰","夔","뇽","누","눈","눋","눌","눔","눕","눗","눠","눼","뉘","뉜","뉩","뉨","뉴","늉","늄","느","늦","늣","늡","늚","늪","늴","늬","닒","닐","닉","니","님","닙","닛","다","닝","단","닭",
|
||
"닫","닮","답","닷","닸","당","댄","鄧","댈","댐","댑","댔","댕","댜","덜","던","덤","덧","덞","덟","덥","덖","덮","데","덫","덩","델","뎀","뎃","뎌","뎐","뎅","뎔","뎠","뎡","뎨","뎬","도","독","渗","돔",
|
||
"돎","돌","돋","돕","동","돝","돛","돗","돤","돠","돨","됐","되","된","됨","됴","됫","두","둔","둘","뒀","둬","뒈","뒬","뒨","뒵","뒤","뒹","듕","듐","든","듦","득","등","디","딕","딤","딥","딧","딜","딩",
|
||
"딨","딸","따","땀","땃","땁","땄","땅","땐","땍","땔","땜","땝","땟","땠","땡","떨","떠","떪","떼","떱","떰","떳","떴","떵","떽","뗀","뗍","뗌","뗏","뗑","뗘","또","똑","똔","똥","똬","뙈","뙤","뙨","똴",
|
||
"뚜","뚠","뚤","뚬","뚱","뜀","뛰","뜩","뜬","뜸","뜰","띈","띠","띔","띨","띳","랄","람","랏","랍","랐","랗","랙","랩","램","랜","랫","랬","략","랸","럇","럴","럼","런","럽","럿","렇","렉","레","렀","렁",
|
||
"렘","렌","렐","렝","려","렛","력","련","렬","렴","령","렷","례","롄","록","론","로","롤","롸","롯","롼","롬","뢍","뢴","룀","뢸","룃","룅","료","루","룐","룩","룟","룡","룝","룰","룹","룻","뤄","룽","뤘",
|
||
"뤠","뤼","륀","률","륌","륩","륨","륫","륜","류","르","름","리","릊","릇","릅","릭","만","마","맘","맏","맒","맛","릿","린","릴","링","말","많","림","맡","맣","맨","맬","매","맴","맵","맷","맺","맹","먈",
|
||
"먀","먕","먁","먹","먼","멋","멉","멂","멀","멍","멎","멕","멘","멤","멥","멨","멩","며","몄","몃","몇","면","멱","몬","몌","목","모","몰","몸","몹","못","몽","뫄","뫘","뫈","묏","묶","무","묘","묑","묩",
|
||
"묵","묜","묫","문","묾","묽","뭅","뭇","뭄","뭍","뭐","뭔","뭘","뮌","뮨","뮤","뭡","뮴","믄","믈","므","뮬","미","믐","믓","믿","민","밈","밋","밌","밍","밑","밖","바","박","반","밗","밞","발","밝","받",
|
||
"밟","밤","백","밴","방","뱀","뱁","뱉","뱍","뱅","뱌","버","벅","번","벌","벎","범","법","벗","벚","베","벧","벵","벽","별","볶","복","볕","봄","봐","봉","봤","뵀","뵈","봬","뵌","뵤","북","부","뵨","붉",
|
||
"뵙","뵐","분","붕","붚","붜","붤","붰","붸","뷩","뷘","뷜","뷰","뷴","뷸","븐","브","븅","븀","블","븝","븟","빈","비","빅","빎","빌","빔","빠","빚","빗","빤","빡","빛","빪","빳","빵","빱","빻","빽","빼",
|
||
"뺄","뺀","뺏","뺍","뺌","뺐","뺙","뺑","뻐","뻑","뻘","뻔","뻠","뼙","뻥","뻣","뻤","뼛","뼜","뽈","뼝","뽕","뾔","뿌","뿍","뿟","뿐","뿔","쀼","쁘","삠","삔","삥","삐","쁨","쁑","쁜","삭","삯","삳","산",
|
||
"살","삶","삽","삼","샀","새","삿","색","상","샌","샨","샐","샙","샥","샷","샬","생","샘","섀","샴","섟","섈","섬","섦","섐","선","섣","섞","석","섯","성","섭","섰","셕","션","셩","셤","세","셥","셉","센",
|
||
"셜","셌","셨","셍","속","셸","솅","소","셰","솖","송","솨","솥","솝","솩","솟","쇤","쇄","솽","솬","쇌","쇘","쇠","쇗","솰","쇔","숀","숍","쇰","숄","숑","숏","쇱","숌","숨","숭","쉔","숲","수","술","숯",
|
||
"숱","쉈","숟","순","숩","숫","쉭","쉠","쉥","쉬","쉘","쉰","쉿","쉽","쉼","슁","슉","슈","슥","슨","슴","슬","슭","스","슘","슝","슐","실","싣","십","싫","신","슷","심","싻","싸","싹","싱","쌓","쌉","쌈",
|
||
"쌀","쌍","쌘","쌕","쌤","썅","써","쌥","쌔","쌩","썬","썩","썽","썰","쎌","썹","썼","쏀","쏟","쏙","쏜","쏠","쏘","쏭","쏨","쏴","쏩","쐴","쐼","쐤","쏵","쐈","쐰","쐐","쑴","쒔","쑤","쑵","쑨","쑥","쑹",
|
||
"쒜","쓩","쒼","쒸","씐","쓺","씌","씁","쓴","쓱","쓰","쓸","씬","씩","씨","씽","씹","아","앉","안","앎","알","앙","압","암","애","앞","旴","앨","앤","얌","앵","앳","야","얇","양","얍","앴","약","얄","앱",
|
||
"얕","얩","얜","어","엄","없","얾","얻","습","엊","엌","엇","었","에","엥","역","열","엶","엷","염","엿","였","영","옆","옇","예","옐","옘","옛","옜","옰","올","옮","옳","옴","옵","옷","옹","옻","와","왁",
|
||
"완","왐","왑","왓","왕","왝","왜","왠","왯","왱","외","왹","왼","욈","욋","욍","욉","요","욕","욘","욜","욥","우","욱","운","욹","욺","워","웅","웁","움","웍","웝","웬","웹","웽","위","윈","윅","윔","윕",
|
||
"윗","율","윙","육","유","윤","윱","윳","읊","윽","으","융","은","응","읒","읔","읕","읠","의","읜","읨","읫","이","익","인","일","읾","입","있","잇","잉","잖","잠","잚","좝","죄","죕","죗","죡","죠","죤",
|
||
"죙","줅","주","작","잤","장","잦","잴","잼","재","嘲","젝","잭","쟉","쟀","쟁","잿","제","저","쟤","접","쟝","적","쟨","절","젖","쟘","젓","젤","젯","졈","젼","젭","젬","져","젱","졌","족","조","졔","졍",
|
||
"좁","졸","졺","존","좀","좃","좋","좌","종","좆","좼","좟","줄","줌","쥘","쥣","쥰","쥔","쥬","쥐","쥑","쥴","즈","쥼","즉","증","직","즛","즐","진","짇","질","집","짊","징","짖","짙","짜","짠","짤","쨋",
|
||
"짬","짱","짼","쨀","쩍","쩌","쨔","쫀","쨉","쨌","쩔","쫴","쬠","쭈","쬡","쭌","쭐","쭘","쭁","쭹","쭸","쩠","쩨","쪼","쪄","쪽","쫄","쫓","쫘","쫙","쫠","쭝","쮜","쮸","쯩","쯤","쯧","찌","찐","찔","찜",
|
||
"찢","찝","찡","찧","찬","착","차","찮","찹","찻","챈","창","채","찾","챔","챘","챙","챕","챦","챨","처","챰","챵","척","청","체","첨","첬","첫","첼","쳄","쳉","쳔","쳤","쳬","쳰","촉","촐","촁","촙","촘",
|
||
"촬","촹","쵠","촛","쵤","쵱","쵯","추","축","춈","출","춤","충","춰","췄","취","췸","췰","췻","췹","췽","츌","츰","츠","츤","츱","층","친","칟","칡","칠","침","칩","칫","칸","칭","칼","카","칵","캇","캐",
|
||
"캡","캘","컁","커","컨","캣","캥","캭","캤","컬","컴","코","컸","케","켄","켈","켐","켕","켓","켜","켠","켤","켭","켬","켯","켱","콕","콘","콩","콧","콱","쾀","쾨","쿡","쿤","쿨","쿰","쿱","쿳","퀭","퀼",
|
||
"퀸","큇","큉","큔","크","큠","큭","큰","클","큼","큽","킁","킨","킹","탉","근","탓","탔","태","탠","탬","탰","탱","턍","털","턺","턱","텀","텃","텅","테","텔","템","텝","텟","톈","텬","톄","톡","토","톨",
|
||
"톰","툉","퇘","퇀","툇","투","툭","툽","툿","퉁","튄","튁","튀","튈","튑","튬","튤","튠","튱","특","트","튿","틀","틈","틋","틔","틜","틱","팀","틴","틥","틸","티","팃","팅","팍","팔","팎","판","팜","팠",
|
||
"팝","팟","팥","팰","팹","팼","펌","펄","펀","퍅","퍼","펏","펭","페","펜","폄","펙","펴","평","폐","폈","폘","폅","폭","폴","폼","폣","포","퐈","퐝","푤","푭","푀","푠","푹","푯","품","풀","풂","풉","풍",
|
||
"풋","퓐","퓔","퓜","퓨","퓻","퓰","퓽","픔","플","픈","피","픽","픕","픗","핀","학","한","할","함","항","핫","핼","핵","햅","핸","행","햐","허","헌","袗","헙","헒","헛","헝","헤","헨","헴","헬","헹","헷",
|
||
"혐","혓","혜","형","혈","혠","혤","혼","혹","홀","홍","홈","홋","화","확","활","환","홧","홱","회","횅","홴","획","횐","횔","횝","횡","횹","횬","횻","후","훅","훈","훌","훑","훙","훗","훠","훵","훰","훨",
|
||
"휀","휄","휑","휴","휠","휭","휩","휨","휼","휸","흄","흔","흗","흖","흙","흡","희","흩","흴","흼","흽","힁","히","힘","힙","힛","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>",
|
||
"<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>",
|
||
"<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","價","<EFBFBD>","伽","加","佳","假","暇","呵","可","家","嘉","哥","嫁","枷","痂","柯","珂","街","茄","歌","苛","稼","袈","賈","迦","軻","却","幹","各","懇","刻","駕","慤","奸","覺","柬",
|
||
"桿","干","杆","角","恪","刊","脚","姦","珏","넥","네","넹","넷","넵","년","녀","녁","념","녑","澗","癎","磵","看","稈","肝","艱","簡","竿","艮","蝎","碣","喝","乫","褐","竭","渴","諫","坎","嵌","柑","橄",
|
||
"堪","減","監","甘","疳","紺","鑒","岬","甲","鉀","胛","閘","剛","姜","崗","岡","康","强","彊","江","慷","糠","綱","客","介","鱇","降","鋼","薑","襁","价","愷","凱","慨","改","個","漑","芥","豈","箇","盖",
|
||
"鎧","開","坑","粳","据","據","羹","乾","建","愆","楗","鍵","杰","乞","傑","劒","儉","劍","桀","檢","劫","憩","偈","格","檄","揭","隔","覡","牽","犬","見","絹","譴","遣","潔","結","決","缺","鉗","慊","訣",
|
||
"謙","鎌","京","俓","儆","傾","勍","勁","卿","徑","庚","憬","慶","境","擎","敬","景","梗","更","炅","璟","瓊","痙","硬","竟","耿","經","競","莖","警","逕","鏡","輕","鯨","係","契","季","屆","悸","戒","桂",
|
||
"癸","磎","界","稽","系","繫","谿","繼","階","古","固","叩","呱","姑","孤","庫","尻","拷","故","敲","暠","枯","沽","槁","痼","皐","睾","稿","考","股","苦","藁","蠱","袴","辜","賈","錮","鼓","斛","坤","穀",
|
||
"鵠","崑","昆","梱","棍","琨","袞","滑","供","鯤","汨","共","功","公","拱","攻","空","珙","貢","鞏","果","戈","串","寡","誇","瓜","菓","槨","鍋","跨","顆","郭","寬","慣","棺","官","括","灌","貫","瓘","管",
|
||
"罐","菅","恝","侊","匡","廣","壙","光","洸","狂","筐","罫","乖","怪","塊","壞","魁","宏","拐","肱","轟","喬","巧","敎","橋","嶠","狡","校","蕎","蛟","膠","轎","較","絞","坵","鮫","俱","句","驕","口","勾",
|
||
"咎","垢","區","廐","具","寇","嘔","構","柩","枸","求","毆","狗","溝","玖","灸","瞿","球","臼","舊","究","苟","購","謳","衢","鉤","邱","駒","軀","銶","國","菊","鳩","驅","鷗","鞠","鞫","麴","群","君","窟",
|
||
"掘","堀","屈","軍","郡","窘","券","宮","窮","芎","圈","卷","權","捲","拳","蕨","眷","淃","蹶","獗","厥","潰","晷","句","饋","鬼","貴","龜","槻","叫","揆","硅","窺","葵","逵","勻","閨","赳","糾","畇","橘",
|
||
"克","菌","劇","筠","剋","懃","僅","隙","劤","戟","斤","菫","槿","瑾","覲","契","近","謹","今","擒","檎","妗","昑","禁","琴","禽","衿","襟","金","錦","伋","及","汲","給","級","扱","伎","肯","矜","其","醵",
|
||
"拒","居","擧","渠","炬","祛","踞","鋸","鉅","冀","埼","圻","岐","崎","妓","嗜","忌","技","旗","朞","氣","欺","汽","沂","璣","畿","琪","璂","琦","祁","祇","祺","箕","耆","紀","綺","羈","記","肌","豈","飢",
|
||
"錤","饑","驥","緊","佶","儺","拮","喇","喫","懶","懦","桔","吉","金","奈","拿","癩","蘿","那","諾","螺","駱","落","洛","邏","卵","亂","欄","爛","鸞","捺","煖","捏","嵐","楠","南","枏","湳","襤","藍","男",
|
||
"衲","囊","納","蠟","廊","浪","狼","郎","奈","冷","耐","柰","撚","秊","女","拈","捻","寧","擄","努","弩","老","露","駑","盧","瑙","虜","菉","綠","鹿","碌","祿","鷺","屢","聾","壘","論","累","腦","嫩","膿",
|
||
"陋","弄","磊","樓","縷","雷","尿","訥","凜","綾","能","稜","陵","多","匿","茶","丹","壇","亶","但","團","短","簞","檀","湍","端","緞","鄲","袒","澾","撻","達","湛","擔","曇","澹","淡","痰","膽","覃","蕁",
|
||
"談","譚","畓","錟","答","踏","堂","唐","棠","塘","當","撞","黨","貸","岱","戴","隊","臺","擡","大","垈","宅","倒","德","到","黛","刀","圖","搗","導","掉","棹","渡","堵","挑","徒","淘","島","悼","桃","睹",
|
||
"禱","逃","蹈","覩","途","賭","鍍","都","陶","瀆","牘","毒","獨","墩","篤","惇","敦","禿","督","暾","焞","豚","凍","頓","仝","冬","憧","棟","東","洞","潼","疼","瞳","童","董","銅","斗","杜","枓","痘","豆",
|
||
"讀","逗","遯","遁","芚","鈍","屯","橙","嶝","燈","得","登","等","藤","騰","拏","喇","羅","螺","裸","珞","樂","落","酪","駱","丹","亂","爛","瀾","鸞","嵐","蘭","辣","欖","濫","籃","蠟","覽","朗","廊","狼",
|
||
"螂","琅","郞","崍","徠","冷","梁","兩","略","亮","倆","樑","粮","粱","諒","侶","儷","櫚","濾","礪","勵","廬","閭","藜","黎","驪","麗","驢","轢","瀝","曆","歷","唱","力","憐","攣","聯","練","漣","璉","裂",
|
||
"連","烈","蓮","輦","列","廉","劣","洌","冽","獵","伶","殮","令","斂","濂","簾","岺","怜","玲","囹","笭","寧","逞","羚","齡","靈","撈","醴","澧","鈴","例","零","櫓","瀘","老","爐","虜","蘆","露","路","鹵",
|
||
"魯","鷺","碌","綠","壟","弄","論","朧","聾","瓏","瀧","瀨","儡","籠","賂","賚","磊","寮","賴","僚","遼","燎","鬧","壘","料","龍","廖","蓼","聊","婁","屢","淚","漏","瘻","縷","鏤","陋","柳","榴","旒","瀏",
|
||
"硫","謬","戮","輪","崙","淪","凌","率","栗","隆","綾","凜","俚","菱","唎","厘","吏","悧","李","浬","犁","理","璃","痢","羸","莉","籬","裏","里","離","鯉","釐","吝","潾","燐","璘","鱗","麟","林"};
|
||
|
||
int PET_DEBUG_initPetOne( int charaindex)
|
||
{
|
||
Char ch;
|
||
int havepetindex;
|
||
int index;
|
||
/* 訶湛旣챘 뺏墩쒜튜袴墩 */
|
||
havepetindex = CHAR_getCharPetElement( charaindex) ;
|
||
|
||
memset( &ch, 0, sizeof( ch));
|
||
if( !CHAR_getDefaultChar( &ch,31010 ) )return -1;
|
||
|
||
/* 已 캄 */
|
||
ch.data[CHAR_BASEBASEIMAGENUMBER]
|
||
= ch.data[CHAR_BASEIMAGENUMBER] = 30008;
|
||
ch.data[CHAR_WHICHTYPE] = CHAR_TYPEPET;
|
||
/* 뺀 */
|
||
ch.workint[CHAR_WORKATTACKPOWER] = 100;
|
||
/* 낢 */
|
||
ch.workint[CHAR_WORKDEFENCEPOWER] = 50;
|
||
/* HP */
|
||
ch.data[CHAR_HP] = 100;
|
||
/* 鏶 */
|
||
strcpysafe( ch.string[CHAR_NAME].string, 32, "녘膠1" );
|
||
|
||
/* CHAR긷奭犢周뺏墩 */
|
||
index = PET_initCharOneArray( &ch);
|
||
|
||
if( index < 0 ) return -1;
|
||
|
||
/* 휄풉拍굶湛旣 */
|
||
CHAR_setWorkInt( index, CHAR_WORKPLAYERINDEX, charaindex);
|
||
CHAR_setWorkInt( index,CHAR_WORKOBJINDEX,-1);
|
||
CHAR_setCharPet( charaindex, havepetindex, index);
|
||
CHAR_setInt( index, CHAR_SLOT, 2);
|
||
return havepetindex;
|
||
}
|
||
|
||
static int _PET_dropPet( int charaindex, int havepetindex, int tofl, int tox, int toy)
|
||
{
|
||
char szPet[128];
|
||
int dirx[9],diry[9];
|
||
int i, j;
|
||
int objindex=-1;
|
||
int floor,x,y;
|
||
int petindex;
|
||
int count_chara =0, count_item =0;
|
||
|
||
if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE)
|
||
!= BATTLE_CHARMODE_NONE) return FALSE;
|
||
petindex = CHAR_getCharPet(charaindex,havepetindex);
|
||
if( !CHAR_CHECKINDEX( petindex )) return FALSE;
|
||
if( !CHAR_CHECKINDEX( charaindex ) )return FALSE;
|
||
if( CHAR_CHECKINDEX( petindex) == FALSE ) return FALSE;
|
||
|
||
#ifdef _AVID_TRADETRYBUG //땔놔녘膠
|
||
if( CHAR_getWorkInt( charaindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_TRADING ){
|
||
CHAR_talkToCli( charaindex, -1, "슥弄榴檄櫓轟랬땔놔녘膠。", CHAR_COLORYELLOW );
|
||
return FALSE;
|
||
}
|
||
#endif
|
||
// CoolFish: Family 2001/6/13
|
||
if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){
|
||
CHAR_talkToCli(charaindex, -1, "소痢磵빱艱轟랬땔놔!", CHAR_COLORYELLOW);
|
||
return FALSE;
|
||
}
|
||
if (CHAR_getInt(charaindex, CHAR_RIDEPET) == havepetindex ){
|
||
CHAR_talkToCli(charaindex, -1, "폄넉櫓돨녘膠轟랬땔놔!", CHAR_COLORYELLOW);
|
||
return FALSE;
|
||
}
|
||
|
||
if( strlen(CHAR_getChar(petindex,CHAR_USERPETNAME))>0 && strstr(CHAR_getChar(petindex,CHAR_USERPETNAME),"*")!=NULL ){
|
||
CHAR_talkToCli(charaindex, -1, "녘膠菱땍屢츰냔櫓벵唐(*),轟랬땔폴、찡듦、슥弄、겠覡,헝錦맣빈꾸鱗。", CHAR_COLORYELLOW);
|
||
return FALSE;
|
||
}
|
||
|
||
#ifdef _DROPCHECK2
|
||
|
||
floor = CHAR_getInt( charaindex, CHAR_FLOOR);
|
||
x = CHAR_getInt( charaindex, CHAR_X);
|
||
y = CHAR_getInt( charaindex, CHAR_Y);
|
||
|
||
for( i = x-CHAR_DEFAULTSEESIZ/2 ; i <= x+CHAR_DEFAULTSEESIZ/2 ; i++ ){
|
||
for( j = y-CHAR_DEFAULTSEESIZ/2 ; j <= y+CHAR_DEFAULTSEESIZ/2 ; j ++ ){
|
||
OBJECT object;
|
||
for( object = MAP_getTopObj(floor,i,j); object ; object = NEXT_OBJECT(object ) ) {
|
||
int objindex = GET_OBJINDEX(object);
|
||
if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue;
|
||
|
||
if( OBJECT_getType(objindex) == OBJTYPE_CHARA ) {
|
||
count_chara++;
|
||
}
|
||
if( OBJECT_getType(objindex) == OBJTYPE_ITEM || OBJECT_getType(objindex) == OBJTYPE_GOLD ) {
|
||
count_item++;
|
||
}
|
||
}
|
||
}
|
||
if( count_item > 80 || count_chara > 80 ) {
|
||
CHAR_talkToCli( charaindex, -1, "侶쟁綠쒔格撻섭죄,꼇콘疼땔죄。", CHAR_COLORYELLOW );
|
||
return FALSE;
|
||
}
|
||
}
|
||
|
||
#endif
|
||
if( tofl == -1 ) {
|
||
for( i = 0 ; i < 7 ; i ++ ){
|
||
dirx[i+2] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR) + i+1);
|
||
diry[i+2] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR) + i+1);
|
||
}
|
||
dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR));
|
||
diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR));
|
||
dirx[1] = 0;
|
||
diry[1] = 0;
|
||
floor = CHAR_getInt( charaindex,CHAR_FLOOR );
|
||
for( i = 0 ; i < 9 ; i ++ ){
|
||
int x=CHAR_getInt(charaindex,CHAR_X)+dirx[i];
|
||
int y=CHAR_getInt(charaindex,CHAR_Y)+diry[i];
|
||
if( PET_isPutPoint( floor, x, y ) == TRUE ) {
|
||
break;
|
||
}
|
||
}
|
||
if( i == 9 ) i = 1;
|
||
x=CHAR_getInt(charaindex,CHAR_X)+dirx[i];
|
||
y=CHAR_getInt(charaindex,CHAR_Y)+diry[i];
|
||
}else {
|
||
if( MAP_walkAbleFromPoint( tofl,tox,toy, FALSE ) == FALSE ) {
|
||
print( "map walkable err %s:%d\n", __FILE__,__LINE__);
|
||
return FALSE;
|
||
}
|
||
floor = tofl;
|
||
x = tox;
|
||
y = toy;
|
||
}
|
||
objindex = PET_dropPetAbsolute( petindex,floor,x,y, FALSE );
|
||
if( objindex == -1 ) return FALSE;
|
||
|
||
CHAR_setWorkInt( petindex,CHAR_WORKOBJINDEX,objindex );
|
||
CHAR_setCharPet( charaindex, havepetindex, -1);
|
||
CHAR_setInt( petindex, CHAR_FLOOR, floor);
|
||
CHAR_setInt( petindex, CHAR_X, x);
|
||
CHAR_setInt( petindex, CHAR_Y, y);
|
||
CHAR_setInt( petindex, CHAR_PUTPETTIME, NowTime.tv_sec);
|
||
if( havepetindex == CHAR_getInt( charaindex, CHAR_DEFAULTPET)) {
|
||
int fd;
|
||
CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1);
|
||
fd = getfdFromCharaIndex( charaindex);
|
||
lssproto_KS_send( fd, havepetindex, 0);
|
||
|
||
}
|
||
CHAR_sendCToArroundCharacter( objindex);
|
||
|
||
if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) {
|
||
#ifdef _PET_ITEM
|
||
CHAR_sendPetItemEmpty(charaindex,havepetindex);
|
||
#endif
|
||
snprintf( szPet, sizeof( szPet ), "K%d", havepetindex );
|
||
CHAR_sendStatusString( charaindex, szPet );
|
||
}
|
||
return TRUE;
|
||
}
|
||
|
||
|
||
/*------------------------------------------------------------
|
||
* 實 訶湛旣챘 훗
|
||
* 짝今
|
||
* itemindex int 呵켈 馬켈숭렇湛盃뎀
|
||
* floor int 겜뤼呵ID
|
||
* x int x慮
|
||
* y int y慮
|
||
* net BOOL <20>湛旣램∋盃섟놈敎챘豚墩쒜<E5A2A9>덮쒜
|
||
* 殺犢걋
|
||
* 纛 objindex
|
||
* 좍 -1
|
||
------------------------------------------------------------*/
|
||
int PET_dropPetAbsolute( int petindex, int floor, int x, int y,BOOL net)
|
||
{
|
||
Object object;
|
||
int objindex;
|
||
|
||
if( !CHAR_CHECKINDEX(petindex) )return FALSE;
|
||
|
||
object.type = OBJTYPE_CHARA;
|
||
object.index = petindex;
|
||
object.x = x;
|
||
object.y = y;
|
||
object.floor = floor;
|
||
|
||
/* 璘튄년콩盃旣擁 豚墩 */
|
||
objindex = initObjectOne( &object );
|
||
|
||
/* <20>湛旣램∋盃겜력븍빳禁焞뺏櫓墩敎巧럽豚墩 by ringo*/
|
||
if( net )
|
||
CHAR_sendWatchEvent( objindex,CHAR_ACTSTAND,NULL,0,TRUE);
|
||
|
||
return objindex;
|
||
}
|
||
|
||
BOOL PET_isPutPoint( int fl,int x, int y)
|
||
{
|
||
OBJECT object;
|
||
if( MAP_walkAbleFromPoint( fl,x,y, FALSE ) == FALSE )
|
||
return FALSE;
|
||
for( object=MAP_getTopObj(fl,x,y) ;
|
||
object ;
|
||
object = NEXT_OBJECT(object ) )
|
||
{
|
||
int objindex = GET_OBJINDEX(object);
|
||
switch( OBJECT_getType(objindex) ){
|
||
case OBJTYPE_NOUSE:
|
||
break;
|
||
case OBJTYPE_ITEM:
|
||
case OBJTYPE_GOLD:
|
||
case OBJTYPE_CHARA:
|
||
return FALSE;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
}
|
||
return TRUE;
|
||
}
|
||
|
||
int PET_dropPet( int charaindex, int havepetindex)
|
||
{
|
||
if( CHAR_getWorkInt( charaindex, CHAR_WORKSAFEMODE)==0)
|
||
{
|
||
CHAR_SafePassword(charaindex);
|
||
return;
|
||
}
|
||
int petindex;
|
||
petindex = CHAR_getCharPet(charaindex,havepetindex);
|
||
if( !CHAR_CHECKINDEX( petindex )) return FALSE;
|
||
#ifdef _PET_AMOI__E
|
||
//if( PET_NOT_DropTradeStreetVandor == EVOLUTION_getPetENABLETRADE( CHAR_getInt( petindex, CHAR_PETID)) ||
|
||
// PET_NOT_Drop == EVOLUTION_getPetENABLETRADE( CHAR_getInt( petindex, CHAR_PETID)) ){
|
||
if( (PET_NOT_DROP) & EVOLUTION_getPetENABLETRADE( CHAR_getInt( petindex, CHAR_PETID))){
|
||
char buf[256];
|
||
sprintf( buf, "%s轟랬땔폴!~",CHAR_getChar( petindex, CHAR_NAME) );
|
||
CHAR_talkToCli(charaindex,-1,buf,CHAR_COLORRED);
|
||
return FALSE;
|
||
}
|
||
#endif
|
||
#ifdef _PETSKILL_BINDING
|
||
int i,skillid=-1,skillarray;
|
||
for(i=0;i<7;i++){
|
||
skillid=CHAR_getPetSkill(petindex,i);
|
||
skillarray = PETSKILL_getPetskillArray( skillid);
|
||
if( PETSKILL_CHECKINDEX( skillarray) == FALSE ) continue;
|
||
if(strstr(PETSKILL_getChar( skillarray, PETSKILL_NAME),"∽")){
|
||
CHAR_talkToCli(charaindex, -1, "늪녘膠槨곬땍녘膠,轟랬땔폴", CHAR_COLORRED);
|
||
return;
|
||
}
|
||
}
|
||
#endif
|
||
#ifdef _PET_BINDING
|
||
if(strstr(CHAR_getChar(petindex,CHAR_NAME),"*") || strstr(CHAR_getChar(petindex,CHAR_NAME),"+")){
|
||
CHAR_talkToCli(charaindex, -1, "늪녘膠槨곬땍녘膠,轟랬땔폴", CHAR_COLORRED);
|
||
return;
|
||
}
|
||
#endif
|
||
#ifdef _MM_NO_JIAOBEN
|
||
if(getNoMMJiaoben()==1){
|
||
if(CHAR_getInt(petindex,CHAR_PETID)==718 || CHAR_getInt( petindex, CHAR_PETID) == 401){
|
||
if(getMmType()==0){
|
||
CHAR_talkToCli(charaindex, -1, getMmMsg(), CHAR_COLORRED);
|
||
return;
|
||
}
|
||
time_t timep;
|
||
struct tm *p;
|
||
time(&timep);
|
||
p=localtime(&timep);
|
||
timep = mktime(p);
|
||
char *randtypetime = CHAR_getChar(charaindex,CHAR_RANDTYPE);
|
||
char tempbuff[64];
|
||
int randtype = 0;
|
||
int randtime = 0;
|
||
int randwrong = 0;
|
||
if(strlen(randtypetime)>2){
|
||
if(getStringFromIndexWithDelim(randtypetime,"-", 3, tempbuff, sizeof(tempbuff)) != FALSE){
|
||
if(getStringFromIndexWithDelim(randtypetime,"-", 1, tempbuff, sizeof(tempbuff))== FALSE)
|
||
return 0;
|
||
randwrong = atoi(tempbuff);
|
||
if(getStringFromIndexWithDelim(randtypetime,"-", 2, tempbuff, sizeof(tempbuff))== FALSE)
|
||
return 0;
|
||
randtype = atoi(tempbuff);
|
||
if(getStringFromIndexWithDelim(randtypetime,"-", 3, tempbuff, sizeof(tempbuff))== FALSE)
|
||
return 0;
|
||
randtime = atoi(tempbuff);
|
||
if(timep - randtime < getEditBaseTime()*randwrong){
|
||
char errbuf[256];
|
||
sprintf(errbuf,"퀭뻘唐%d취꼽옵鹿셨崎늪꾸鱗!",getEditBaseTime()*randwrong-(timep - randtime));
|
||
CHAR_talkToCli(charaindex, -1, errbuf, CHAR_COLORRED);
|
||
return 0;
|
||
}
|
||
}
|
||
}
|
||
// if(timep-CHAR_getWorkInt(charaindex,CHAR_WORKRANDEDITBASETIME)>=getEditBaseTime())
|
||
// CHAR_setWorkInt(charaindex,CHAR_WORKRANDEDITBASETIME,timep);
|
||
// else{
|
||
// char errbuf[256];
|
||
// sprintf(errbuf,"퀭뻘唐%d취꼽옵鹿셨崎늪꾸鱗!",getEditBaseTime()-(timep-CHAR_getWorkInt(charaindex,CHAR_WORKRANDEDITBASETIME)));
|
||
// CHAR_talkToCli(charaindex, -1, errbuf, CHAR_COLORRED);
|
||
// return;
|
||
// }
|
||
int fd = getfdFromCharaIndex( charaindex);
|
||
char arg[255];
|
||
char buf[128];
|
||
char jiabuf[][5]={"속","⑼","⑺","⑹","⒵","枷","⑴"};
|
||
char jianbuf[][5]={"숑","寧","-","―","-","―","ı"};
|
||
char chengbuf[][5]={"넉","*","x","X","X","x","*"};
|
||
char numbuf[][5]={"0","1","2","3","4","5","6","7","8","9"};
|
||
int i,j,k,l,m;
|
||
i = RAND(30,70);
|
||
j = RAND(1,29);
|
||
l = RAND(1,7);
|
||
m = RAND(1,3);
|
||
char *typebuf;
|
||
// if(randtype == 0){
|
||
// randtype = RAND(1,10);
|
||
// if(randtype<=5){
|
||
// randtype = RAND(1,10);
|
||
// if(randtype<=3) randtype=1;
|
||
// else randtype=2;
|
||
// }else{
|
||
// randtype = RAND(1,10);
|
||
// if(randtype<=3) randtype=3;
|
||
// else randtype=4;
|
||
// }
|
||
// }
|
||
randtype = 4;
|
||
if(randtype==1){
|
||
if(m==1){
|
||
typebuf=jiabuf[l-1];
|
||
k = i+j;
|
||
}else{
|
||
typebuf=jianbuf[l-1];
|
||
k = i-j;
|
||
}
|
||
char ibuf[10],jbuf[10];
|
||
if(i<10){
|
||
sprintf(ibuf,"%s",numbuf[i]);
|
||
}else{
|
||
int ia,ib;
|
||
ia = i/10;
|
||
ib = i - ia*10;
|
||
sprintf(ibuf,"%s",numbuf[ia]);
|
||
strcat(ibuf,numbuf[ib]);
|
||
}
|
||
if(j<10){
|
||
sprintf(jbuf,"%s",numbuf[j]);
|
||
}else{
|
||
int ja,jb;
|
||
ja = j/10;
|
||
jb = j - ja*10;
|
||
sprintf(jbuf,"%s",numbuf[ja]);
|
||
strcat(jbuf,numbuf[jb]);
|
||
}
|
||
sprintf(arg,"%d|%d",havepetindex,k);
|
||
CHAR_setWorkChar(charaindex, CHAR_WORKDROPMM, arg);
|
||
sprintf(buf,"헝渴흙侶몸炬減무駕돨써벎(%s%s%s=?):",ibuf,typebuf,jbuf);
|
||
lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGEANDLINEINPUT,
|
||
WINDOW_BUTTONTYPE_OK,
|
||
CHAR_WINDOWTYPE_RAND1_DROPMM,
|
||
-1,
|
||
buf);
|
||
}else if(randtype==2){
|
||
if(m==1){
|
||
typebuf=jiabuf[l-1];
|
||
k = i+j;
|
||
}else if(m==2){
|
||
typebuf=jianbuf[l-1];
|
||
k = i-j;
|
||
}else{
|
||
typebuf=chengbuf[l-1];
|
||
k = i*j;
|
||
}
|
||
char ibuf[10],jbuf[10];
|
||
if(i<10){
|
||
sprintf(ibuf,"%s",numbuf[i]);
|
||
}else{
|
||
int ia,ib;
|
||
ia = i/10;
|
||
ib = i - ia*10;
|
||
sprintf(ibuf,"%s",numbuf[ia]);
|
||
strcat(ibuf,numbuf[ib]);
|
||
}
|
||
if(j<10){
|
||
sprintf(jbuf,"%s",numbuf[j]);
|
||
}else{
|
||
int ja,jb;
|
||
ja = j/10;
|
||
jb = j - ja*10;
|
||
sprintf(jbuf,"%s",numbuf[ja]);
|
||
strcat(jbuf,numbuf[jb]);
|
||
}
|
||
int n;
|
||
int randnum1;
|
||
char tempret[5][32];
|
||
randnum1 = RAND(1,5);
|
||
int randnumbuf[4];
|
||
int tmpi=0;
|
||
while(tmpi<100){
|
||
randnumbuf[0] = RAND(1,100);
|
||
randnumbuf[1] = RAND(1,100);
|
||
randnumbuf[2] = RAND(1,100);
|
||
randnumbuf[3] = RAND(1,100);
|
||
if(randnumbuf[0]!=randnumbuf[1]!=randnumbuf[2]!=randnumbuf[3]!=k){
|
||
break;
|
||
}
|
||
tmpi++;
|
||
}
|
||
tmpi=0;
|
||
for(n=1;n<=5;n++){
|
||
if(n==randnum1){
|
||
sprintf(tempret[n-1],"%d",k);
|
||
}else if(tmpi<4){
|
||
sprintf(tempret[n-1],"%d",randnumbuf[tmpi]);
|
||
tmpi++;
|
||
}
|
||
}
|
||
sprintf(arg,"%d|%d",havepetindex,randnum1);
|
||
CHAR_setWorkChar(charaindex, CHAR_WORKDROPMM, arg);
|
||
sprintf(buf,"3\n헝朞嶝侶몸炬減무駕돨써벎(%s%s%s=?):\n \n \n朞淃寧:%s\n朞淃랗:%s\n朞淃힛:%s\n朞淃愷:%s\n朞淃巧:%s\n",ibuf,typebuf,jbuf,tempret[0],tempret[1],tempret[2],tempret[3],tempret[4]);
|
||
lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT,
|
||
WINDOW_BUTTONTYPE_OK,
|
||
CHAR_WINDOWTYPE_RAND2_DROPMM,
|
||
-1,
|
||
buf);
|
||
}else if(randtype==3){
|
||
sprintf(arg,"%s",sasql_rand_buf());
|
||
if(strcmp(arg,"err")==0) return;
|
||
char tempbuf[64];
|
||
char randquestion[64];
|
||
char randrightanswer[64];
|
||
if(getStringFromIndexWithDelim(arg,"|", 1, tempbuf, sizeof(tempbuf)) == FALSE)
|
||
return;
|
||
strcpy(randquestion,tempbuf);
|
||
if(getStringFromIndexWithDelim(arg,"|", 2, tempbuf, sizeof(tempbuf)) == FALSE)
|
||
return;
|
||
strcpy(randrightanswer,tempbuf);
|
||
sprintf(arg,"%d|%s",havepetindex,randrightanswer);
|
||
CHAR_setWorkChar(charaindex, CHAR_WORKDROPMM, arg);
|
||
sprintf(buf,"%s:",randquestion);
|
||
lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGEANDLINEINPUT,
|
||
WINDOW_BUTTONTYPE_OK,
|
||
CHAR_WINDOWTYPE_RAND3_DROPMM,
|
||
-1,
|
||
buf);
|
||
}else{
|
||
// sprintf(arg,"%s",sasql_rand_buf());
|
||
// if(strcmp(arg,"err")==0) return;
|
||
char tempbuf[64];
|
||
char randquestion[64];
|
||
char randrightanswer[64];
|
||
char randwronganswer1[64];
|
||
char randwronganswer2[64];
|
||
char randwronganswer3[64];
|
||
char randwronganswer4[64];
|
||
// if(getStringFromIndexWithDelim(arg,"|", 1, tempbuf, sizeof(tempbuf)) == FALSE)
|
||
// return;
|
||
// strcpy(randquestion,tempbuf);
|
||
// if(getStringFromIndexWithDelim(arg,"|", 2, tempbuf, sizeof(tempbuf)) == FALSE)
|
||
// return;
|
||
// strcpy(randrightanswer,tempbuf);
|
||
// if(getStringFromIndexWithDelim(arg,"|", 3, tempbuf, sizeof(tempbuf)) == FALSE)
|
||
// return;
|
||
// strcpy(randwronganswer1,tempbuf);
|
||
// if(getStringFromIndexWithDelim(arg,"|", 4, tempbuf, sizeof(tempbuf)) == FALSE)
|
||
// return;
|
||
// strcpy(randwronganswer2,tempbuf);
|
||
// if(getStringFromIndexWithDelim(arg,"|", 5, tempbuf, sizeof(tempbuf)) == FALSE)
|
||
// return;
|
||
// strcpy(randwronganswer3,tempbuf);
|
||
// if(getStringFromIndexWithDelim(arg,"|", 6, tempbuf, sizeof(tempbuf)) == FALSE)
|
||
// return;
|
||
// strcpy(randwronganswer4,tempbuf);
|
||
memset(tempbuf, 0, sizeof(tempbuf));
|
||
memset(randquestion, 0, sizeof(randquestion));
|
||
memset(randrightanswer, 0, sizeof(randrightanswer));
|
||
memset(randwronganswer1, 0, sizeof(randwronganswer1));
|
||
memset(randwronganswer2, 0, sizeof(randwronganswer2));
|
||
memset(randwronganswer3, 0, sizeof(randwronganswer3));
|
||
memset(randwronganswer4, 0, sizeof(randwronganswer4));
|
||
if(RAND(1,100)<=75){
|
||
char randtmpbuf[4][10];
|
||
sprintf(randtmpbuf[0],"%s",hanzibuf[RAND(1,5000)-1]);
|
||
sprintf(randtmpbuf[1],"%s",hanzibuf[RAND(1,5000)-1]);
|
||
sprintf(randtmpbuf[2],"%s",hanzibuf[RAND(1,5000)-1]);
|
||
sprintf(randtmpbuf[3],"%s",hanzibuf[RAND(1,5000)-1]);
|
||
sprintf(randquestion,"%s",str_hanzi_ganrao(randtmpbuf[0],randtmpbuf[1],randtmpbuf[2],randtmpbuf[3],0,0,0,0,0,0));
|
||
strcat(randquestion,"(헝冷놔宮谿늦莉)");
|
||
int newrand1 = RAND(1,100)-1;
|
||
int newrand2 = RAND(1,100)-1;
|
||
int newrand3 = RAND(1,100)-1;
|
||
int newrand4 = RAND(1,100)-1;
|
||
int newrand5 = RAND(1,100)-1;
|
||
sprintf(randrightanswer,"%s",str_hanzi_ganrao(randtmpbuf[0],randtmpbuf[1],randtmpbuf[2],randtmpbuf[3],1,newrand1,newrand2,newrand3,newrand4,newrand5));
|
||
sprintf(randwronganswer1,"%s",str_hanzi_ganrao(randtmpbuf[0],randtmpbuf[1],randtmpbuf[3],randtmpbuf[2],1,newrand1,newrand2,newrand3,newrand4,newrand5));
|
||
sprintf(randwronganswer2,"%s",str_hanzi_ganrao(randtmpbuf[3],randtmpbuf[1],randtmpbuf[2],randtmpbuf[0],1,newrand1,newrand2,newrand3,newrand4,newrand5));
|
||
sprintf(randwronganswer3,"%s",str_hanzi_ganrao(randtmpbuf[1],randtmpbuf[0],randtmpbuf[2],randtmpbuf[3],1,newrand1,newrand2,newrand3,newrand4,newrand5));
|
||
sprintf(randwronganswer4,"%s",str_hanzi_ganrao(randtmpbuf[2],randtmpbuf[3],randtmpbuf[0],randtmpbuf[1],1,newrand1,newrand2,newrand3,newrand4,newrand5));
|
||
|
||
}else{
|
||
int tii;
|
||
char timubuf[36][5] = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"};
|
||
for(tii=0;tii<5;tii++){
|
||
if(tii==0)
|
||
strcpy(tempbuf,timubuf[RAND(1,36)-1]);
|
||
else{
|
||
int timunum = 0;
|
||
while(1){
|
||
timunum = RAND(1,36)-1;
|
||
if(strstr(tempbuf,timubuf[timunum])==NULL)
|
||
break;
|
||
}
|
||
strcat(tempbuf,timubuf[timunum]);
|
||
}
|
||
}
|
||
sprintf(randwronganswer1,"[%c%c%c%c%c]",tempbuf[0],tempbuf[2],tempbuf[1],tempbuf[3],tempbuf[4]);
|
||
sprintf(randwronganswer2,"[%c%c%c%c%c]",tempbuf[0],tempbuf[1],tempbuf[4],tempbuf[2],tempbuf[3]);
|
||
sprintf(randwronganswer3,"[%c%c%c%c%c]",tempbuf[4],tempbuf[1],tempbuf[2],tempbuf[0],tempbuf[3]);
|
||
sprintf(randwronganswer4,"[%c%c%c%c%c]",tempbuf[1],tempbuf[0],tempbuf[2],tempbuf[3],tempbuf[4]);
|
||
sprintf(randquestion,"[%s](헝冷놔宮谿늦莉)",tempbuf);
|
||
sprintf(randrightanswer,"[%s]",tempbuf);
|
||
char* randstr = NULL;
|
||
randstr = str_ganrao(randquestion);
|
||
strcpy(randquestion,randstr);
|
||
randstr = str_ganraoan(randrightanswer);
|
||
strcpy(randrightanswer,randstr);
|
||
randstr = str_ganraoan(randwronganswer1);
|
||
strcpy(randwronganswer1,randstr);
|
||
randstr = str_ganraoan(randwronganswer2);
|
||
strcpy(randwronganswer2,randstr);
|
||
randstr = str_ganraoan(randwronganswer3);
|
||
strcpy(randwronganswer3,randstr);
|
||
randstr = str_ganraoan(randwronganswer4);
|
||
strcpy(randwronganswer4,randstr);
|
||
}
|
||
int n;
|
||
int randnum1;
|
||
m=1;
|
||
char tempret[5][64];
|
||
randnum1 = RAND(1,5);
|
||
int rightnum,wrongnum1,wrongnum2,wrongnum3,wrongnum4;
|
||
rightnum = RAND(getRandMin(),getRandMax());
|
||
wrongnum1 = RAND(getRandMin(),getRandMax());
|
||
wrongnum2 = RAND(getRandMin(),getRandMax());
|
||
wrongnum3 = RAND(getRandMin(),getRandMax());
|
||
wrongnum4 = RAND(getRandMin(),getRandMax());
|
||
//char *tempbuff2 = "ABCDE";
|
||
int qianhounum = RAND(1,100);
|
||
for(n=1;n<=5;n++){
|
||
if(n==randnum1){
|
||
if(qianhounum<=50)
|
||
sprintf(tempret[n-1],"朞淃( %d %s )",rightnum,randrightanswer);
|
||
else
|
||
sprintf(tempret[n-1],"朞淃( %s %d )",randrightanswer,rightnum);
|
||
}else{
|
||
if(m==1){
|
||
if(qianhounum<=50)
|
||
sprintf(tempret[n-1],"朞淃( %d %s )",wrongnum1,randwronganswer1);
|
||
else
|
||
sprintf(tempret[n-1],"朞淃( %s %d )",randwronganswer1,wrongnum1);
|
||
m = 2;
|
||
}else if(m==2){
|
||
if(qianhounum<=50)
|
||
sprintf(tempret[n-1],"朞淃( %d %s )",wrongnum2,randwronganswer2);
|
||
else
|
||
sprintf(tempret[n-1],"朞淃( %s %d )",randwronganswer2,wrongnum2);
|
||
m = 3;
|
||
}else if(m==3){
|
||
if(qianhounum<=50)
|
||
sprintf(tempret[n-1],"朞淃( %d %s )",wrongnum3,randwronganswer3);
|
||
else
|
||
sprintf(tempret[n-1],"朞淃( %s %d )",randwronganswer3,wrongnum3);
|
||
m = 4;
|
||
}else if(m==4){
|
||
if(qianhounum<=50)
|
||
sprintf(tempret[n-1],"朞淃( %d %s )",wrongnum4,randwronganswer4);
|
||
else
|
||
sprintf(tempret[n-1],"朞淃( %s %d )",randwronganswer4,wrongnum4);
|
||
m = 5;
|
||
}
|
||
}
|
||
}
|
||
int windowtype = 0;
|
||
int selecttype = RAND(1,100);
|
||
if(selecttype<=30){
|
||
sprintf(arg,"%d|%d|%d",havepetindex,rightnum);
|
||
windowtype = WINDOW_MESSAGETYPE_MESSAGEANDLINEINPUT;
|
||
}else{
|
||
sprintf(arg,"%d|%d|%d",havepetindex,randnum1);
|
||
windowtype = WINDOW_MESSAGETYPE_SELECT;
|
||
}
|
||
CHAR_setWorkChar(charaindex, CHAR_WORKDROPMM, arg);
|
||
sprintf(buf,"%s\n%s\n%s\n%s\n%s\n%s\n渴흙攣횅댑갭윅뵀코돨5貫鑒俚샀諒듐朞댑갭",randquestion,tempret[0],tempret[1],tempret[2],tempret[3],tempret[4]);
|
||
lssproto_WN_send( fd, windowtype,
|
||
WINDOW_BUTTONTYPE_OK,
|
||
CHAR_WINDOWTYPE_RAND4_DROPMM,
|
||
-1,
|
||
buf);
|
||
CHAR_setWorkInt(charaindex,CHAR_WORKLUANPCINT,0);
|
||
}
|
||
if(randwrong<=0){
|
||
sprintf(tempbuff,"1-%d-%d",randtype,timep);
|
||
}else{
|
||
sprintf(tempbuff,"%d-%d-%d",randwrong*3,randtype,timep);
|
||
}
|
||
CHAR_setChar(charaindex,CHAR_RANDTYPE,tempbuff);
|
||
return 0;
|
||
}
|
||
}
|
||
#endif
|
||
if( _PET_dropPet( charaindex, havepetindex, -1,-1,-1) == TRUE ){
|
||
char tmpbuf[256];
|
||
sprintf(tmpbuf,"땔폴 %s (녘膠句呵珂쇌%d취)。",CHAR_getChar( petindex, CHAR_NAME),getPetdeletetime());
|
||
CHAR_talkToCli( charaindex, -1, tmpbuf, CHAR_COLORYELLOW );
|
||
LogPet(
|
||
CHAR_getChar( charaindex, CHAR_NAME ), /* 틱텀력 */
|
||
CHAR_getChar( charaindex, CHAR_CDKEY ),
|
||
CHAR_getChar( petindex, CHAR_NAME),
|
||
CHAR_getInt( petindex, CHAR_LV),
|
||
"Drop(땔녘)",
|
||
CHAR_getInt( charaindex,CHAR_FLOOR),
|
||
CHAR_getInt( charaindex,CHAR_X ),
|
||
CHAR_getInt( charaindex,CHAR_Y ),
|
||
CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14
|
||
);
|
||
return 1;
|
||
}
|
||
return 0;
|
||
}
|
||
|
||
int PET_dropPetFLXY( int charaindex, int havepetindex, int fl, int x, int y)
|
||
{
|
||
return _PET_dropPet( charaindex, havepetindex, fl,x,y);
|
||
}
|
||
|
||
/*------------------------------------------------------------
|
||
* 訶湛旣暘섟켈챙숭旣橈今챘굶湛旣抹뺏連墩
|
||
------------------------------------------------------------*/
|
||
int PET_initCharOneArray( Char *ch)
|
||
{
|
||
int i;
|
||
char *tmp[CHAR_FUNCTABLENUM] = {
|
||
"", /* CHAR_INITFUNC */
|
||
"", /* CHAR_WALKPREFUNC */
|
||
"", /* CHAR_WALKPOSTFUNC */
|
||
"", /* CHAR_PREOVERFUNC */
|
||
"", /* CHAR_PREOVERFUNC */
|
||
"core_PetWatch", /* CHAR_WATCHFUNC */
|
||
"", /* CHAR_LOOPFUNC */
|
||
"", /* CHAR_DYINGFUNC */
|
||
"core_PetTalk", /* CHAR_TALKEDFUNC */
|
||
"", /* CHAR_PREATTACKEDFUNC */
|
||
"", /* CHAR_POSTATTACKEDFUNC */
|
||
"", /* CHAR_OFFFUNC */
|
||
"", /* CHAR_LOOKEDFUNC */
|
||
"", /* CHAR_ITEMPUTFUNC */
|
||
"", /* CHAR_SPECIALTALKEDFUNC */
|
||
"", /* CHAR_WINDOWTALKEDFUNC */
|
||
#ifdef _USER_CHARLOOPS
|
||
"", // CHAR_LOOPFUNCTEMP1,
|
||
"", // CHAR_LOOPFUNCTEMP2,
|
||
"", //CHAR_BATTLEPROPERTY,
|
||
#endif
|
||
};
|
||
for( i = 0; i < CHAR_FUNCTABLENUM; i ++ ) {
|
||
strcpysafe( ch->charfunctable[i].string,
|
||
sizeof( ch->charfunctable[i]),
|
||
tmp[i]);
|
||
}
|
||
if( ch->data[CHAR_MAILMODE] != CHAR_PETMAIL_NONE ) {
|
||
strcpysafe( ch->charfunctable[CHAR_LOOPFUNC].string,
|
||
sizeof( ch->charfunctable[CHAR_LOOPFUNC]), "PETMAIL_Loop");
|
||
|
||
}
|
||
#ifdef _USER_CHARLOOPS
|
||
if( ch->data[CHAR_FUSIONBEIT] == 1 &&
|
||
ch->data[CHAR_FUSIONRAISE] > 0 ) {
|
||
//andy_log
|
||
// print("init CHAR_LOOPFUNCTEMP1:%s \n", "PET_CheckIncubateLoop");
|
||
|
||
strcpysafe( ch->charfunctable[CHAR_LOOPFUNCTEMP1].string,
|
||
sizeof( ch->charfunctable[CHAR_LOOPFUNCTEMP1]), "PET_CheckIncubateLoop");
|
||
ch->data[CHAR_LOOPINTERVAL] = 60000;
|
||
|
||
ch->functable[CHAR_LOOPFUNCTEMP1]
|
||
= getFunctionPointerFromName( "PET_CheckIncubateLoop");
|
||
|
||
// CHAR_constructFunctable( petindex);
|
||
}
|
||
#endif
|
||
return( CHAR_initCharOneArray( ch));
|
||
}
|
||
|
||
int PET_createPetFromCharaIndex( int charaindex, int enemyindex)
|
||
{
|
||
Char CharNew;
|
||
int newindex;
|
||
int havepetelement;
|
||
char szPet[128];
|
||
int i;
|
||
|
||
havepetelement = CHAR_getCharPetElement( charaindex);
|
||
if( havepetelement < 0 ) return -1;
|
||
memset( &CharNew, 0, sizeof( Char ) );
|
||
if( !CHAR_getDefaultChar( &CharNew,31010 ) )return -1;
|
||
CharNew.data[CHAR_BASEBASEIMAGENUMBER]
|
||
= CharNew.data[CHAR_BASEIMAGENUMBER] = CHAR_getInt(enemyindex,CHAR_BASEIMAGENUMBER);
|
||
CharNew.data[CHAR_WHICHTYPE] = CHAR_TYPEPET;
|
||
CharNew.data[CHAR_HP] = CHAR_getInt(enemyindex, CHAR_HP);
|
||
CharNew.data[CHAR_MP] = CHAR_getInt(enemyindex, CHAR_MP);
|
||
CharNew.data[CHAR_MAXMP] = CHAR_getInt(enemyindex, CHAR_MAXMP);
|
||
CharNew.data[CHAR_VITAL] = CHAR_getInt(enemyindex, CHAR_VITAL);
|
||
CharNew.data[CHAR_STR] = CHAR_getInt(enemyindex, CHAR_STR);
|
||
CharNew.data[CHAR_TOUGH] = CHAR_getInt(enemyindex, CHAR_TOUGH);
|
||
CharNew.data[CHAR_DEX] = CHAR_getInt(enemyindex, CHAR_DEX);
|
||
CharNew.data[CHAR_LUCK] = CHAR_getInt(enemyindex, CHAR_LUCK);
|
||
CharNew.data[CHAR_FIREAT] = CHAR_getInt(enemyindex, CHAR_FIREAT);
|
||
CharNew.data[CHAR_WATERAT] = CHAR_getInt(enemyindex, CHAR_WATERAT);
|
||
CharNew.data[CHAR_EARTHAT] = CHAR_getInt(enemyindex, CHAR_EARTHAT);
|
||
CharNew.data[CHAR_WINDAT] = CHAR_getInt(enemyindex, CHAR_WINDAT);
|
||
//CharNew.data[CHAR_EXP] = CHAR_getInt(enemyindex, CHAR_EXP);
|
||
|
||
CharNew.data[CHAR_SLOT] = CHAR_getInt(enemyindex, CHAR_SLOT);
|
||
CharNew.data[CHAR_MODAI] = CHAR_getInt(enemyindex, CHAR_MODAI);
|
||
CharNew.data[CHAR_LV] = CHAR_getInt(enemyindex, CHAR_LV);
|
||
CharNew.data[CHAR_POISON] = CHAR_getInt(enemyindex, CHAR_POISON);
|
||
CharNew.data[CHAR_PARALYSIS]= CHAR_getInt(enemyindex, CHAR_PARALYSIS);
|
||
CharNew.data[CHAR_SLEEP] = CHAR_getInt(enemyindex, CHAR_SLEEP);
|
||
CharNew.data[CHAR_STONE] = CHAR_getInt(enemyindex, CHAR_STONE);
|
||
CharNew.data[CHAR_DRUNK] = CHAR_getInt(enemyindex, CHAR_DRUNK);
|
||
CharNew.data[CHAR_CONFUSION]= CHAR_getInt(enemyindex, CHAR_CONFUSION);
|
||
CharNew.data[CHAR_RARE] = CHAR_getInt(enemyindex, CHAR_RARE);
|
||
CharNew.data[CHAR_PETRANK] = CHAR_getInt(enemyindex, CHAR_PETRANK);
|
||
CharNew.data[CHAR_PETID] = CHAR_getInt(enemyindex, CHAR_PETID);
|
||
CharNew.data[CHAR_CRITIAL] = CHAR_getInt(enemyindex, CHAR_CRITIAL);
|
||
CharNew.data[CHAR_COUNTER] = CHAR_getInt(enemyindex, CHAR_COUNTER);
|
||
CharNew.data[CHAR_PETMAILEFFECT] = RAND(0, PETMAIL_EFFECTMAX);
|
||
CharNew.data[CHAR_PETENEMYID] = CHAR_getInt(enemyindex, CHAR_PETENEMYID);
|
||
|
||
for( i = 0; i < CHAR_MAXPETSKILLHAVE; i ++ ) {
|
||
CharNew.unionTable.indexOfPetskill[i] = CHAR_getPetSkill( enemyindex, i);
|
||
}
|
||
CharNew.data[CHAR_ALLOCPOINT] = CHAR_getInt(enemyindex, CHAR_ALLOCPOINT);
|
||
strcpysafe( CharNew.string[CHAR_NAME].string,
|
||
sizeof(CharNew.string[CHAR_NAME].string),
|
||
CHAR_getChar( enemyindex, CHAR_NAME) );
|
||
newindex = PET_initCharOneArray( &CharNew );
|
||
#ifdef _CAX_LVTISHI
|
||
if (CharNew.data[CHAR_LV] == 1){//흔벎껫謬돕돨녘膠角1섬
|
||
int namelen=strlen(CHAR_getChar(newindex, CHAR_NAME));//삿돤녘膠츰냔돨낀똑
|
||
char petname[namelen-3];//凜槨狼혼딜괜괜侶愷몸俚륜,杰鹿路劤<E8B7AF>零츰냔돨뺐,殮쌈혤句딜빈충돨愷몸俚륜
|
||
snprintf( petname, sizeof( petname),"%s",CHAR_getChar( newindex, CHAR_NAME));
|
||
CHAR_setChar( newindex, CHAR_NAME, petname);
|
||
}
|
||
#endif
|
||
if( newindex < 0 ){
|
||
return -1;
|
||
}
|
||
|
||
CHAR_setMaxExpFromLevel( newindex, CHAR_getInt( enemyindex, CHAR_LV ));
|
||
CHAR_complianceParameter( newindex );
|
||
CHAR_setWorkInt( newindex, CHAR_WORKPLAYERINDEX, charaindex);
|
||
CHAR_setCharPet( charaindex, havepetelement, newindex);
|
||
CHAR_setChar( newindex, CHAR_OWNERCDKEY,
|
||
CHAR_getChar( charaindex, CHAR_CDKEY));
|
||
CHAR_setChar( newindex, CHAR_OWNERCHARANAME,
|
||
CHAR_getChar( charaindex, CHAR_NAME));
|
||
snprintf( szPet, sizeof( szPet ), "K%d", havepetelement );
|
||
CHAR_sendStatusString( charaindex, szPet );
|
||
snprintf( szPet, sizeof( szPet ), "W%d", havepetelement );
|
||
CHAR_sendStatusString( charaindex, szPet );
|
||
|
||
return newindex;
|
||
|
||
}
|
||
BOOL PET_SelectBattleEntryPet( int charaindex, int petarray)
|
||
{
|
||
int pindex;
|
||
/* 얽 럽쫴훗 력븍튈놈컁긷짝焞쒜쒜墩뒤 쥰摩犢 */
|
||
if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE)
|
||
!= BATTLE_CHARMODE_NONE) return FALSE;
|
||
/* -1섟堯퀼럽]-1긷抹뺏굶湛旣抹뺏귁더犢[*/
|
||
if( petarray == -1 ) {
|
||
CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1 );
|
||
return TRUE;
|
||
}
|
||
if( !CHAR_CHECKPETINDEX( petarray)) return FALSE;
|
||
pindex = CHAR_getCharPet( charaindex, petarray );
|
||
if( !CHAR_CHECKINDEX( pindex)) return FALSE;
|
||
|
||
if( CHAR_getFlg( pindex, CHAR_ISDIE )) return FALSE;
|
||
#ifdef _RIDEBUG
|
||
//털뙤角뤠槨폄녘
|
||
if(CHAR_getInt( charaindex, CHAR_RIDEPET) == petarray) return FALSE;
|
||
#endif
|
||
CHAR_setInt( charaindex, CHAR_DEFAULTPET, petarray );
|
||
|
||
return TRUE;
|
||
}
|
||
|
||
// Robin 0707 petFollow <charaindex>
|
||
#if 1
|
||
int PET_dropPetFollow( int charaindex, int havepetindex, int tofl, int tox, int toy)
|
||
{
|
||
char szPet[128];
|
||
int dirx[9],diry[9];
|
||
int i;
|
||
int objindex=-1;
|
||
int floor,x,y;
|
||
int petindex;
|
||
|
||
if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE)
|
||
!= BATTLE_CHARMODE_NONE) return FALSE;
|
||
petindex = CHAR_getCharPet(charaindex,havepetindex);
|
||
if( petindex == -1 ) return FALSE;
|
||
if( !CHAR_CHECKINDEX( charaindex ) )return FALSE;
|
||
if( CHAR_CHECKINDEX( petindex) == FALSE ) return FALSE;
|
||
|
||
if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){
|
||
CHAR_talkToCli(charaindex, -1, "소痢磵빱艱轟랬땔놔!", CHAR_COLORYELLOW);
|
||
return FALSE;
|
||
}
|
||
if (CHAR_getInt(charaindex, CHAR_RIDEPET) == havepetindex){
|
||
CHAR_talkToCli(charaindex, -1, "폄넉櫓돨녘膠轟랬뫄踞!", CHAR_COLORYELLOW);
|
||
return FALSE;
|
||
}
|
||
if( tofl == -1 ) {
|
||
for( i = 0 ; i < 7 ; i ++ ){
|
||
dirx[i+2] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR) + i+1);
|
||
diry[i+2] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR) + i+1);
|
||
}
|
||
dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR));
|
||
diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR));
|
||
dirx[1] = 0;
|
||
diry[1] = 0;
|
||
|
||
floor = CHAR_getInt( charaindex,CHAR_FLOOR );
|
||
for( i = 0 ; i < 9 ; i ++ ){
|
||
int x=CHAR_getInt(charaindex,CHAR_X)+dirx[i];
|
||
int y=CHAR_getInt(charaindex,CHAR_Y)+diry[i];
|
||
if( PET_isPutPoint( floor, x, y ) == TRUE ) {
|
||
break;
|
||
}
|
||
}
|
||
if( i == 9 ) i = 1;
|
||
|
||
x=CHAR_getInt(charaindex,CHAR_X)+dirx[i];
|
||
y=CHAR_getInt(charaindex,CHAR_Y)+diry[i];
|
||
}
|
||
else {
|
||
if( MAP_walkAbleFromPoint( tofl,tox,toy, FALSE ) == FALSE ) {
|
||
print( "map walkable err %s:%d\n", __FILE__,__LINE__);
|
||
return FALSE;
|
||
}
|
||
floor = tofl;
|
||
x = tox;
|
||
y = toy;
|
||
}
|
||
|
||
objindex = PET_dropPetAbsolute( petindex,floor,x,y, FALSE );
|
||
if( objindex == -1 ) return FALSE;
|
||
|
||
CHAR_setWorkInt( petindex,CHAR_WORKOBJINDEX,objindex );
|
||
CHAR_setCharPet( charaindex, havepetindex, -1);
|
||
CHAR_setInt( petindex, CHAR_FLOOR, floor);
|
||
CHAR_setInt( petindex, CHAR_X, x);
|
||
CHAR_setInt( petindex, CHAR_Y, y);
|
||
CHAR_setInt( petindex, CHAR_PUTPETTIME, NowTime.tv_sec);
|
||
if( havepetindex == CHAR_getInt( charaindex, CHAR_DEFAULTPET)) {
|
||
int fd;
|
||
CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1);
|
||
fd = getfdFromCharaIndex( charaindex);
|
||
lssproto_KS_send( fd, havepetindex, 0);
|
||
|
||
}
|
||
CHAR_sendCToArroundCharacter( objindex);
|
||
if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) {
|
||
#ifdef _PET_ITEM
|
||
CHAR_sendPetItemData( charaindex, havepetindex);
|
||
#endif
|
||
snprintf( szPet, sizeof( szPet ), "K%d", havepetindex );
|
||
CHAR_sendStatusString( charaindex, szPet );
|
||
}
|
||
|
||
CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, petindex);
|
||
CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWMODE, CHAR_PETFOLLOW_NOW);
|
||
CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT, 0);
|
||
CHAR_setInt( petindex, CHAR_PUTPETTIME, (int)(NowTime.tv_sec));
|
||
CHAR_setInt( petindex, CHAR_WORKPLAYERINDEX, charaindex);
|
||
LogPet(
|
||
CHAR_getChar( charaindex, CHAR_NAME ),
|
||
CHAR_getChar( charaindex, CHAR_CDKEY ),
|
||
CHAR_getChar( petindex, CHAR_NAME),
|
||
CHAR_getInt( petindex, CHAR_LV),
|
||
"Follow(즉녘)",
|
||
CHAR_getInt( charaindex,CHAR_FLOOR),
|
||
CHAR_getInt( charaindex,CHAR_X ),
|
||
CHAR_getInt( charaindex,CHAR_Y ),
|
||
CHAR_getChar( petindex, CHAR_UNIQUECODE)
|
||
);
|
||
return 1;
|
||
}
|
||
#endif
|
||
|
||
BOOL PET_getBaseForAllocpoint( int toindex, int *work)
|
||
{
|
||
int LevelUpPoint=0;
|
||
if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPET)
|
||
return FALSE;
|
||
LevelUpPoint = CHAR_getInt( toindex, CHAR_ALLOCPOINT );
|
||
work[3] =(( LevelUpPoint >> 24 ) & 0xFF);
|
||
work[0] = (( LevelUpPoint >> 16 ) & 0xFF);
|
||
work[1] = (( LevelUpPoint >> 8 ) & 0xFF);
|
||
work[2] = (( LevelUpPoint >> 0 ) & 0xFF);
|
||
return TRUE;
|
||
}
|
||
|
||
void PET_showEditBaseMsg( int charaindex, int toindex, int itemindex, int *work)
|
||
{
|
||
int i, maxnums = 6000;
|
||
char buf1[256];
|
||
char buf2[][32]={"控제냥낀쪽","켐씹제냥낀쪽","醵똑냥낀쪽","竟제냥낀쪽","콘제"};
|
||
char buf3[][32]={"댕류瓊멕","쫠槨瓊멕","쫠槨숑<EFBFBD>"};
|
||
|
||
if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPET)
|
||
return;
|
||
memset( buf1, 0, sizeof( buf1));
|
||
|
||
for( i=0; i<4; i++) {
|
||
int type = ITEM_getInt( itemindex, (ITEM_MODIFYATTACK + i));
|
||
// print(" 菅[%d]%d+%d ", i, work[i], type);
|
||
work[i] += type;
|
||
strcpy( buf1,"\0");
|
||
if( work[i] > maxnums ) {
|
||
sprintf(buf1,"%s 綠쒔댐돕離멕죄。", buf2[i]);
|
||
work[i] = maxnums;
|
||
}else if( work[i] < 0 ) {
|
||
sprintf(buf1,"%s 綠쒔槨쥐죄。", buf2[i]);
|
||
work[i] = 0;
|
||
}else {
|
||
if( type > 0 ) {
|
||
if( type > 2 ) {
|
||
sprintf(buf1,"%s %s %s", buf2[i], buf3[0], "。");
|
||
}else {
|
||
sprintf(buf1,"%s %s %s", buf2[i], buf3[1], "。");
|
||
}
|
||
}else if( type < 0 ){
|
||
sprintf(buf1,"%s %s %s", buf2[i], buf3[2], "。");
|
||
}
|
||
}
|
||
if( strcmp( buf1, "\0")) {
|
||
CHAR_talkToCli( charaindex, toindex, buf1, CHAR_COLORYELLOW);
|
||
}
|
||
}
|
||
}
|
||
|
||
#ifdef _PET_EVOLUTION
|
||
BOOL PET_getBaseAndSkill( int charaindex, int baseindex, int *base, int *skill, int flg)
|
||
{
|
||
int i;
|
||
if( !CHAR_CHECKINDEX( baseindex)) return FALSE;
|
||
if( base != NULL ) {
|
||
int levelup = CHAR_getInt( baseindex, CHAR_ALLOCPOINT);
|
||
base[0] = ((levelup>>24) & 0xFF);
|
||
base[1] = ((levelup>>16) & 0xFF);
|
||
base[2] = ((levelup>> 8) & 0xFF);
|
||
base[3] = ((levelup>> 0) & 0xFF);
|
||
}
|
||
|
||
if( skill != NULL ) {
|
||
for( i=0; i<CHAR_MAXPETSKILLHAVE; i++) {
|
||
skill[i] = CHAR_getPetSkill( baseindex, i);
|
||
}
|
||
}
|
||
|
||
return TRUE;
|
||
}
|
||
|
||
#endif
|
||
BOOL CHAR_DelPetForIndex( int charaindex, int petindex)
|
||
{
|
||
int i;
|
||
for( i=0; i<CHAR_MAXPETHAVE; i++) {
|
||
int pindex = CHAR_getCharPet( charaindex, i);
|
||
if( !CHAR_CHECKINDEX( pindex) ) continue;
|
||
if( pindex == petindex )
|
||
break;
|
||
}
|
||
|
||
if( i >= CHAR_MAXPETHAVE){
|
||
return FALSE;
|
||
}else {
|
||
char szPet[256];
|
||
char msgbuf[256];
|
||
CHAR_setCharPet( charaindex, i, -1);
|
||
snprintf( szPet, sizeof( szPet ), "K%d", i);
|
||
CHAR_sendStatusString( charaindex, szPet );
|
||
|
||
snprintf( msgbuf,sizeof( msgbuf), "슥놔%s。", CHAR_getChar( petindex, CHAR_NAME));
|
||
CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORYELLOW);
|
||
CHAR_endCharOneArray( petindex );
|
||
}
|
||
return TRUE;
|
||
}
|
||
|
||
|