comparison Items.cpp @ 1104:5d5c78088274

strcmpi to stricmp conversion
author Grumpy7
date Mon, 27 May 2013 21:37:14 +0200
parents 7033eb155558
children 29a8defbad9e 23632c91ed0a
comparison
equal deleted inserted replaced
1103:db395ce89ede 1104:5d5c78088274
542 case 3: //Value 542 case 3: //Value
543 pItems[item_counter].uValue=atoi(test_string); 543 pItems[item_counter].uValue=atoi(test_string);
544 break; 544 break;
545 case 4: //Equip Stat 545 case 4: //Equip Stat
546 { 546 {
547 if ( !_strcmpi(test_string, "weapon") ) 547 if ( !_stricmp(test_string, "weapon") )
548 { 548 {
549 pItems[item_counter].uEquipType = EQUIP_OFF_HAND; 549 pItems[item_counter].uEquipType = EQUIP_OFF_HAND;
550 break; 550 break;
551 } 551 }
552 if ( !_strcmpi(test_string, "weapon2") ) 552 if ( !_stricmp(test_string, "weapon2") )
553 { 553 {
554 pItems[item_counter].uEquipType = EQUIP_MAIN_HAND; 554 pItems[item_counter].uEquipType = EQUIP_MAIN_HAND;
555 break; 555 break;
556 } 556 }
557 if ( !_strcmpi(test_string, "weapon1or2") ) 557 if ( !_stricmp(test_string, "weapon1or2") )
558 { 558 {
559 pItems[item_counter].uEquipType = EQUIP_OFF_HAND; 559 pItems[item_counter].uEquipType = EQUIP_OFF_HAND;
560 break; 560 break;
561 } 561 }
562 if ( !(_strcmpi(test_string, "missile")&&_strcmpi(test_string, "bow"))) 562 if ( !(_stricmp(test_string, "missile")&&_stricmp(test_string, "bow")))
563 { 563 {
564 pItems[item_counter].uEquipType = EQUIP_BOW; 564 pItems[item_counter].uEquipType = EQUIP_BOW;
565 break; 565 break;
566 } 566 }
567 if ( !_strcmpi(test_string, "armor") ) 567 if ( !_stricmp(test_string, "armor") )
568 { 568 {
569 pItems[item_counter].uEquipType = EQUIP_ARMOUR; 569 pItems[item_counter].uEquipType = EQUIP_ARMOUR;
570 break; 570 break;
571 } 571 }
572 if ( !_strcmpi(test_string, "shield") ) 572 if ( !_stricmp(test_string, "shield") )
573 { 573 {
574 pItems[item_counter].uEquipType = EQUIP_SHIELD; 574 pItems[item_counter].uEquipType = EQUIP_SHIELD;
575 break; 575 break;
576 } 576 }
577 if ( !_strcmpi(test_string, "helm") ) 577 if ( !_stricmp(test_string, "helm") )
578 { 578 {
579 pItems[item_counter].uEquipType = EQUIP_HELMET; 579 pItems[item_counter].uEquipType = EQUIP_HELMET;
580 break; 580 break;
581 } 581 }
582 if ( !_strcmpi(test_string, "belt") ) 582 if ( !_stricmp(test_string, "belt") )
583 { 583 {
584 pItems[item_counter].uEquipType = EQUIP_BELT; 584 pItems[item_counter].uEquipType = EQUIP_BELT;
585 break; 585 break;
586 } 586 }
587 if ( !_strcmpi(test_string, "cloak") ) 587 if ( !_stricmp(test_string, "cloak") )
588 { 588 {
589 pItems[item_counter].uEquipType = EQUIP_CLOAK; 589 pItems[item_counter].uEquipType = EQUIP_CLOAK;
590 break; 590 break;
591 } 591 }
592 if ( !_strcmpi(test_string, "gauntlets") ) 592 if ( !_stricmp(test_string, "gauntlets") )
593 { 593 {
594 pItems[item_counter].uEquipType = EQUIP_GAUNTLETS; 594 pItems[item_counter].uEquipType = EQUIP_GAUNTLETS;
595 break; 595 break;
596 } 596 }
597 if ( !_strcmpi(test_string, "boots") ) 597 if ( !_stricmp(test_string, "boots") )
598 { 598 {
599 pItems[item_counter].uEquipType = EQUIP_BOOTS; 599 pItems[item_counter].uEquipType = EQUIP_BOOTS;
600 break; 600 break;
601 } 601 }
602 if ( !_strcmpi(test_string, "ring") ) 602 if ( !_stricmp(test_string, "ring") )
603 { 603 {
604 pItems[item_counter].uEquipType = EQUIP_RING; 604 pItems[item_counter].uEquipType = EQUIP_RING;
605 break; 605 break;
606 } 606 }
607 if ( !_strcmpi(test_string, "amulet") ) 607 if ( !_stricmp(test_string, "amulet") )
608 { 608 {
609 pItems[item_counter].uEquipType = EQUIP_AMULET; 609 pItems[item_counter].uEquipType = EQUIP_AMULET;
610 break; 610 break;
611 } 611 }
612 if ( !_strcmpi(test_string, "weaponw") ) 612 if ( !_stricmp(test_string, "weaponw") )
613 { 613 {
614 pItems[item_counter].uEquipType = EQUIP_WAND; 614 pItems[item_counter].uEquipType = EQUIP_WAND;
615 break; 615 break;
616 } 616 }
617 if ( !(_strcmpi(test_string, "herb")&&_strcmpi(test_string, "reagent"))) 617 if ( !(_stricmp(test_string, "herb")&&_stricmp(test_string, "reagent")))
618 { 618 {
619 pItems[item_counter].uEquipType = EQUIP_REAGENT; 619 pItems[item_counter].uEquipType = EQUIP_REAGENT;
620 break; 620 break;
621 } 621 }
622 if ( !_strcmpi(test_string, "bottle") ) 622 if ( !_stricmp(test_string, "bottle") )
623 { 623 {
624 pItems[item_counter].uEquipType = EQUIP_POTION; 624 pItems[item_counter].uEquipType = EQUIP_POTION;
625 break; 625 break;
626 } 626 }
627 if ( !_strcmpi(test_string, "sscroll") ) 627 if ( !_stricmp(test_string, "sscroll") )
628 { 628 {
629 pItems[item_counter].uEquipType = EQUIP_SPELL_SCROLL; 629 pItems[item_counter].uEquipType = EQUIP_SPELL_SCROLL;
630 break; 630 break;
631 } 631 }
632 if ( !_strcmpi(test_string, "book") ) 632 if ( !_stricmp(test_string, "book") )
633 { 633 {
634 pItems[item_counter].uEquipType = EQUIP_BOOK; 634 pItems[item_counter].uEquipType = EQUIP_BOOK;
635 break; 635 break;
636 } 636 }
637 if ( !_strcmpi(test_string, "mscroll") ) 637 if ( !_stricmp(test_string, "mscroll") )
638 { 638 {
639 pItems[item_counter].uEquipType = EQUIP_MESSAGE_SCROLL; 639 pItems[item_counter].uEquipType = EQUIP_MESSAGE_SCROLL;
640 break; 640 break;
641 } 641 }
642 if ( !_strcmpi(test_string, "gold") ) 642 if ( !_stricmp(test_string, "gold") )
643 { 643 {
644 pItems[item_counter].uEquipType = EQUIP_GOLD; 644 pItems[item_counter].uEquipType = EQUIP_GOLD;
645 break; 645 break;
646 } 646 }
647 if ( !_strcmpi(test_string, "gem") ) 647 if ( !_stricmp(test_string, "gem") )
648 { 648 {
649 pItems[item_counter].uEquipType = EQUIP_GEM; 649 pItems[item_counter].uEquipType = EQUIP_GEM;
650 break; 650 break;
651 } 651 }
652 pItems[item_counter].uEquipType = EQUIP_NONE; 652 pItems[item_counter].uEquipType = EQUIP_NONE;
653 break; 653 break;
654 } 654 }
655 case 5: //Skill Group 655 case 5: //Skill Group
656 { 656 {
657 if ( !_strcmpi(test_string, "staff") ) 657 if ( !_stricmp(test_string, "staff") )
658 { 658 {
659 pItems[item_counter].uSkillType = PLAYER_SKILL_STAFF; 659 pItems[item_counter].uSkillType = PLAYER_SKILL_STAFF;
660 break; 660 break;
661 } 661 }
662 if ( !_strcmpi(test_string, "sword") ) 662 if ( !_stricmp(test_string, "sword") )
663 { 663 {
664 pItems[item_counter].uSkillType = PLAYER_SKILL_SWORD; 664 pItems[item_counter].uSkillType = PLAYER_SKILL_SWORD;
665 break; 665 break;
666 } 666 }
667 if ( !_strcmpi(test_string, "dagger") ) 667 if ( !_stricmp(test_string, "dagger") )
668 { 668 {
669 pItems[item_counter].uSkillType = PLAYER_SKILL_DAGGER; 669 pItems[item_counter].uSkillType = PLAYER_SKILL_DAGGER;
670 break; 670 break;
671 } 671 }
672 if ( !_strcmpi(test_string, "axe") ) 672 if ( !_stricmp(test_string, "axe") )
673 { 673 {
674 pItems[item_counter].uSkillType = PLAYER_SKILL_AXE; 674 pItems[item_counter].uSkillType = PLAYER_SKILL_AXE;
675 break; 675 break;
676 } 676 }
677 if ( !_strcmpi(test_string, "spear") ) 677 if ( !_stricmp(test_string, "spear") )
678 { 678 {
679 pItems[item_counter].uSkillType = PLAYER_SKILL_SPEAR; 679 pItems[item_counter].uSkillType = PLAYER_SKILL_SPEAR;
680 break; 680 break;
681 } 681 }
682 if ( !_strcmpi(test_string, "bow") ) 682 if ( !_stricmp(test_string, "bow") )
683 { 683 {
684 pItems[item_counter].uSkillType = PLAYER_SKILL_BOW; 684 pItems[item_counter].uSkillType = PLAYER_SKILL_BOW;
685 break; 685 break;
686 } 686 }
687 if ( !_strcmpi(test_string, "mace") ) 687 if ( !_stricmp(test_string, "mace") )
688 { 688 {
689 pItems[item_counter].uSkillType = PLAYER_SKILL_MACE; 689 pItems[item_counter].uSkillType = PLAYER_SKILL_MACE;
690 break; 690 break;
691 } 691 }
692 if ( !_strcmpi(test_string, "blaster") ) 692 if ( !_stricmp(test_string, "blaster") )
693 { 693 {
694 pItems[item_counter].uSkillType = PLAYER_SKILL_BLASTER; 694 pItems[item_counter].uSkillType = PLAYER_SKILL_BLASTER;
695 break; 695 break;
696 } 696 }
697 if ( !_strcmpi(test_string, "shield") ) 697 if ( !_stricmp(test_string, "shield") )
698 { 698 {
699 pItems[item_counter].uSkillType = PLAYER_SKILL_SHIELD; 699 pItems[item_counter].uSkillType = PLAYER_SKILL_SHIELD;
700 break; 700 break;
701 } 701 }
702 if ( !_strcmpi(test_string, "leather") ) 702 if ( !_stricmp(test_string, "leather") )
703 { 703 {
704 pItems[item_counter].uSkillType = PLAYER_SKILL_LEATHER; 704 pItems[item_counter].uSkillType = PLAYER_SKILL_LEATHER;
705 break; 705 break;
706 } 706 }
707 if ( !_strcmpi(test_string, "chain") ) 707 if ( !_stricmp(test_string, "chain") )
708 { 708 {
709 pItems[item_counter].uSkillType = PLAYER_SKILL_CHAIN; 709 pItems[item_counter].uSkillType = PLAYER_SKILL_CHAIN;
710 break; 710 break;
711 } 711 }
712 if ( !_strcmpi(test_string, "plate") ) 712 if ( !_stricmp(test_string, "plate") )
713 { 713 {
714 pItems[item_counter].uSkillType = PLAYER_SKILL_PLATE; 714 pItems[item_counter].uSkillType = PLAYER_SKILL_PLATE;
715 break; 715 break;
716 } 716 }
717 if ( !_strcmpi(test_string, "club") ) 717 if ( !_stricmp(test_string, "club") )
718 { 718 {
719 pItems[item_counter].uSkillType = PLAYER_SKILL_CLUB; 719 pItems[item_counter].uSkillType = PLAYER_SKILL_CLUB;
720 break; 720 break;
721 } 721 }
722 pItems[item_counter].uSkillType = PLAYER_SKILL_MISC; 722 pItems[item_counter].uSkillType = PLAYER_SKILL_MISC;
754 case 7: //Mod2 754 case 7: //Mod2
755 pItems[item_counter].uDamageMod=atoi(test_string); 755 pItems[item_counter].uDamageMod=atoi(test_string);
756 break; 756 break;
757 case 8: //material 757 case 8: //material
758 { 758 {
759 if ( !_strcmpi(test_string, "artifact") ) 759 if ( !_stricmp(test_string, "artifact") )
760 { 760 {
761 pItems[item_counter].uMaterial = MATERIAL_ARTEFACT; 761 pItems[item_counter].uMaterial = MATERIAL_ARTEFACT;
762 break; 762 break;
763 } 763 }
764 if ( !_strcmpi(test_string, "relic") ) 764 if ( !_stricmp(test_string, "relic") )
765 { 765 {
766 pItems[item_counter].uMaterial = MATERIAL_RELIC; 766 pItems[item_counter].uMaterial = MATERIAL_RELIC;
767 break; 767 break;
768 } 768 }
769 if ( !_strcmpi(test_string, "special") ) 769 if ( !_stricmp(test_string, "special") )
770 { 770 {
771 pItems[item_counter].uMaterial = MATERIAL_SPECIAL; 771 pItems[item_counter].uMaterial = MATERIAL_SPECIAL;
772 break; 772 break;
773 } 773 }
774 pItems[item_counter].uMaterial = MATERIAL_COMMON; 774 pItems[item_counter].uMaterial = MATERIAL_COMMON;